certUtil -hashfile FILENAME [SHA256|MD5]
Apparently cmd.exe no longer has a default startup script. According to Stackoverflow you have to configure it in the registry. Add a string value named AutoRun to one of these keys and set the value to the full path of the startup script.
HKCU\Software\Microsoft\Command Processor HKLM\Software\Microsoft\Command Processor HKLM\Software\Wow6432Node\Microsoft\Command Processor
Yes, I should probably learn Powershell but I have enough shit to learn and powershell uses insanely long hyphenated commands. I know you can tab complete but still, WTF? Also, after being Windows-free and generally Microsoft free for five years and coming back, I've realized that Microsoft makes shit. The issue is largely the UI. I like having a lot of options but the MS UIs are sooo freaking busy that I can never find anything.
From CLI use /o:GN. Make it permanent with setx DIRCMD “/o:gn”
or otherwise adding an environment variable like set DIRCMD=“o:gn”
, perhaps in that startup script I mentioned above.
echo %HOMEDRIVE%%HOMEPATH%
will echo your home drive and folder.
netsh
is a PITA with it's long, mutli-level syntax but it gives better answers than ipconfig
for a lot of things.
This will give you a cutdown version of ipconfig.
ipconfig /all | findstr "IPv4 adapter Physical Server Name"
netsh interface ip show config
netsh interface ip show config “Connection Name”
ipconfig /all | findstr “adapter Physical IPv4”
netsh wlan show interfaces
netsh wlan show networks mod=bssid
netsh interface ip show route
route print -4
netsh lan show interfaces
net start dot3svc
and then stop it with net stop dot3svc
.getmac /V | findstr /V disconnected
Get-CimInstance win32_networkadapterconfiguration | select description, macaddress | where {$_.MACAddress -ne $null }
nbtstat -a 10.11.12.13
From: https://www.rubyguides.com/2012/02/cli-ninja-ping-sweep/
for /L %i in (1,1,255) do @ping -n 1 -w 200 192.168.1.%i > nul && echo 192.168.1.%i is up.
As you can see the idea is the same, -n being the equivalent of -c in Linux’s ping and -w is the timeout, then we send the output to nul and echo only if the ping command was successful (that’s what the && is for)
whoami /groups
shows what AD groups the current user is in.# reboot windows in 5 minutes shutdown /r /t 300
# abort shutdown shutdown /a
setx PATH "path with quotes if there are spaces (there are)"
What is the Windows equivalent of "wc -l"?
find /c /v ""