IT-info > Windows

Misc. commands

hostname

Name of computer

whoami

Name of computer/name of logged in user

query user

List logged in users

40 useful windows commands

40 Windows Commands you NEED to know (in 10 Minutes)

NOTE: Run Command Prompt as administrator. How to

ipconfig
ipconfig /all
ipconfig /all | findstr DNS  (you can use findstr on any command)
ipconfig /release
ipconfig /renew
ipconfig /displaydns
ipconfig /displaydns | clip  (copies output to clipboard)
ipconfig /flushdns
nslookup domain name
nslookup domain name 8.8.8.8  (Google DNS server)
nslookup -type=mx domain name  (check for other types of DNS records from MX to TXT to pointers)
nslookup -type=ptr domain name  (DNS record type: pointer)
cls
getmac /v
powercfg /energy
powercfg /batteryreport  (copy file location into cmd and press Enter key to see report)
assoc  (lists default programs for file extensions)
assoc .mp4=VLC.vlc  (syntax for associate file extension with a specific program)
chkdsk /f
chkdsk /r  (might require a reboot)
sfc /scannow  (system file checker)
DISM /Online /Cleanup-Image /CheckHealth
DISM /Online /Cleanup-Image /RestoreHealth
tasklist | findstr script
taskkill /f /pid pid number
netsh wlan show wlanreport
netsh interface show interface
netsh interface ip show address | findstr "IP Address"
netsh interface ip show dnsservers

netsh advfirewall set allprotiles stat off  (turn Windows built-in firewall off)
netsh advfirewall set allprotiles stat on  (turn Windows built-in firewall on)

NetworkChuck promotes Bitdefender Total Security (Bitfefender Premium Security) which can't be turned off this way.

ping domain name
ping -t domain name  (pinging doesn't stop - use keyboard keys Ctrl C to end cycle)
tracert domain name  (trace route)
tracert -d domain name  (trace route)
netstat
netstat -af
netstat -o
route print  (shows your computer's routing table)

route add 192.168.40.0 mask 255.255.255.0 10.7.1.44  (getting to the 192.168.40.0 network through 10.7.1.44 gateway)
route delete 192.168.40.0

exit  (exit/closes Command Prompt)
shutdown  (turns computer off)
shutdown /r /fw /f /t 0  (turns computer off and reboots straight into BIOS)