justinbentley.net - CMD

Window's Command Line

~ Networking ~
ipconfig /all
show ip info
ipconfig /displaydns
show dns cache records
nslookup
query url ip using default nameserver
nslookup *
query w/ * nameserver (eg 8.8.8.8)
nslookup jbn.ai
get ip for jbn.ai
getmac /v
list network adapters
netsh wlan show wlanreport
report on wireless info
ping *
ping * (eg 123.123.123.123 or google.com)
tracert *
show hop info
netstat -o
show port activity w/ PID
netstat -e -t 5
quick net report (w/ or w/o 5 second refresh)
~ Hardware ~
powerconfig /energy
report on power profile and some useful info
powerconfig /batteryreport
battery report
perfmon /report
create perfmon report
tasklist
show all running tasks
tasklist | findstr chrome
show running tasks containing "chrome"
taskkill /?
kill task/s, /? for help
taskkill /IM chrome.exe /T /F
kill all traces of chrome.exe
taskkill /PID * /T /F
kill process id from tasklist
chkdsk /?
check hard drives, /? for help
chkdsk C: /F
attempt repair on C:\
chkdsk E: /R
attempt in-depth repair on E:\
cleanmgr
ui to clean win update/temp files
sfc /scannow
check/repair system files system file check
DISM /Online /Cleanup-Image /RestoreHealth
Heavier system file repair (req for corrupt sfc +reboot)
mdsched
queue a memtest after restart (result in eventlog)
slmgr /dli
Show windows edition, license status
~ Pipes ~
Can be added to previous commands
*, wildcard arbitrary string (ie ipconfig /all | findstr DNS)

| findstr *
show only record/rows containing *
| clip
output to clipboard (ie tasklist | clip)
~ Directory ~
dir
show all in current directory
dir /P
show all, page by page
dir *.exe
show all .exe's in directory
dir abc* /S
Show abc* in current & child directories
cd *
step into * directory (ie cd Users or Users\User)
cd..
step out one directory
cd\
return to root directory
e:
switch to E:\ drive
iexplore.exe
run iexplore.exe (while in directory)
REN oldname.png newname.png
Rename file (while in directory)