Tech Notes, Windows CMD

Just my Windows command notes…

  • Show DNS
    • ipconfig /all | findstr DNS
  • Show all DNS Records
    • ipconifg /displaydns
  • Show all DNS Records and Copy to clipboard
    • ipconfig /displaydns | clip
  • Flush Local DNS Resolver Cache
    • ipconfig /flushdns
  • Show Network Info about Domain
    • nslookup domain.com
  • Show Network Info about Domain from Specific DNS Server
    • nslookup domain.com 8.8.8.8
  • Show DNS records of Specific Type for Domain
    • nslookup -type=mx domain.com
    • nslookup -type=txt domain.com
    • nslookup -type=ptr domain.com
  • Show MAC Address for All Adapters
    • getmac /v
  • Report: Power Issues
    • powercfg /energy
  • Report: Battery Issues
    • powercfg /batteryreport
  • File Types: Show Associations
    • assoc
  • File Types: Reassociate with Application
    • assoc .mp4=VLC.vlc
  • System – Check Disk: Check for disk errors
    • chkdsk /f
  • System – Check Disk: Check for sector issues and repair them
    • chkdsk /r
  • System – Scan and Fix Windows
    • sfc /scannow
  • System – Scan System Image
    • DISM /Online /Cleanup /CheckHealth
  • System – Scan System Image, Long Scan
    • DISM /Online /Cleanup /ScanHealth
  • System – Scan System Image, Restore
    • DISM /Online /Cleanup /RestoreHealth
    • (Issues? Run all ‘System’ commands and another sfc /scannow when done)
  • Tasks: List Tasks
    • tasklist | findstr script
    • (where ‘script’ is part of the exe file name)
  • Tasks: Kill Task
    • taskkill /f /pid 1234
    • (where 1234 is the pid found in Listing)
  • NETSH: Wireless Situation Report
    • netsh wlan show wlanreport
  • NETSH: Show Interfaces
    • netsh interface show interface
  • NETSH: Show IP Address
    • netsh interface ip show address | findstr “IP Address”
  • NETSH: Show DNS Servers
    • netsh interface ip show dnsservers
  • NETSH: Turn Off Windows Defender Firewall
    • netsh advfirewall set allprofiles state off
  • NETSH: Turn On Windows Defender Firewall
    • netsh advfirewall set allprofiles state on
  • Ping: Repeatedly
    • ping -t host
  • TraceRoute
    • tracert domain.com
  • TraceRoute: Don’t Resolve Domain Names
    • tracert -d domain.com
  • NetStat: Show Connections To/From Localhost
    • netstat
  • NetStat: Show Open Ports
    • netstat -af
  • NetStat: Show PID for Connections
    • netstat -o
  • NetStat: Sent/Received Stats Every 5 Seconds
    • netstat -e -t 5
  • Show Routing Table
    • route print
  • Shutdown Windows
    • shutdown
  • Shutdown Windows and Reboot to BIOS
    • shutdown /r /fw /t 0
Tech Notes, Windows CMD
Scroll to top