Windows
Windows Network Commands
Complete reference for Windows networking commands including ipconfig, netstat, ping, tracert, nslookup, netsh, arp, route, and telnet for network diagnostics and configuration.
57 commands
Windows
#windows
#networking
#ipconfig
#netstat
#ping
#tracert
#nslookup
#netsh
IP Configuration
Display basic IP configuration
ipconfig
Display detailed IP configuration for all adapters
ipconfig /all
Clear DNS Resolver Cache
ipconfig /flushdns
Refresh DHCP and re-register DNS
ipconfig /registerdns
Release current DHCP IP address
ipconfig /release
Renew DHCP IP address
ipconfig /renew
Display contents of DNS Resolver Cache
ipconfig /displaydns
Connection Testing
Test connectivity to a host
ping google.com
Continuous ping until stopped (Ctrl+C)
ping -t google.com
Send 10 ping requests
ping -n 10 192.168.1.1
Ping with specific packet size
ping -l 1500 google.com
Force IPv4
ping -4 google.com
Force IPv6
ping -6 google.com
Route Tracing
Trace route to destination
tracert google.com
Trace route without resolving hostnames
tracert -d google.com
Set maximum hops to 20
tracert -h 20 google.com
Combined ping and tracert with statistics
pathping google.com
DNS Lookup
Query DNS for a domain
nslookup google.com
Query MX (mail) records
nslookup -type=MX google.com
Query nameserver records
nslookup -type=NS google.com
Query TXT records
nslookup -type=TXT google.com
Query using specific DNS server
nslookup -type=A google.com 8.8.8.8
Network Statistics
Display all connections and listening ports
netstat -an
Show executable for each connection
netstat -b
Display connections with process IDs
netstat -o
Display routing table
netstat -r
Display per-protocol statistics
netstat -s
Display Ethernet statistics
netstat -e
Show only TCP connections
netstat -p tcp
ARP & MAC
Display ARP cache (IP to MAC mappings)
arp -a
Clear entire ARP cache
arp -d *
Add static ARP entry
arp -s 192.168.1.10 00-aa-bb-cc-dd-ee
Display MAC addresses for all adapters
getmac
Display MAC addresses with verbose details
getmac /v
Routing
Display the routing table
route print
Add a static route
route add 10.0.0.0 mask 255.0.0.0 192.168.1.1
Delete a route
route delete 10.0.0.0
Add persistent route
route -p add 10.0.0.0 mask 255.0.0.0 192.168.1.1
Network Shell (netsh)
List saved Wi-Fi profiles
netsh wlan show profiles
Show Wi-Fi password
netsh wlan show profile name="WiFiName" key=clear
Show network interfaces status
netsh interface show interface
Show IP configuration per interface
netsh interface ip show config
Show firewall status for all profiles
netsh advfirewall show allprofiles
Disable Windows Firewall
netsh advfirewall set allprofiles state off
Enable Windows Firewall
netsh advfirewall set allprofiles state on
Reset Winsock catalog
netsh winsock reset
Reset TCP/IP stack
netsh int ip reset
Remote Connectivity
Test TCP connection to port 80
telnet hostname 80
PowerShell port test
Test-NetConnection google.com -Port 443
Detailed connection test
tnc google.com -Port 443 -InformationLevel Detailed
HTTP request (Win10+)
curl http://example.com
Network Shares & Sessions
List computers on the network
net view
Display shared resources
net share
Map network drive
net use Z: \\server\share
Disconnect network drive
net use Z: /delete
Display current sessions
net session
Display network statistics
net statistics workstation