Windows:CommandLine

From DN Wiki
Jump to navigation Jump to search

Network Info

netsh is a PITA with it's long, mutli-level syntax but it gives better answers than ipconfig for a lot of things.

ip info

  • netsh interface ip show config
  • You can also get a specific connection with:
    • netsh interface ip show config "Connection Name"
  • Filtered ipconfig version to show Connection Name, MAC and IP
    • ipconfig /all | findstr "adapter Physical IPv4"

WLAN BSSID

  • netsh wlan show interfaces
  • netsh wlan show networks mod=bssid

Routing table

  • netsh interface ip show route
  • route print -4

MAC

  • netsh lan show interfaces
    • If it tells you "The Wired AutoConfig Service (dot3svc) is not running." you can start it with net start dot3svc and then stop it with net stop dot3svc.
  • getmac /V | findstr /V disconnected
  • Powershell
    • Get-CimInstance win32_networkadapterconfiguration | select description, macaddress | where {$_.MACAddress -ne $null }
  • For a remote Windows computer:
    • nbtstat -a 10.11.12.13