Although the 'netsh' command is used frequently as a scripting tool, it can be run from a Command prompt. All network configuration options can be modified with netsh. It can be used as a powerful diagnostic tool to troubleshoot network problems.
Primary documentation for netsh is available from Microsoft. Here's a list of netsh command line switches.
Reset TCP/IP
In Windows XP netsh can be used to reset TCP/IP. Very useful when a new program or suspected malware screws up Windows TCP/IP settings.
- Open a CMD prompt
- Type: netsh int ip reset and press Enter.
Fix Winsock
In Windows XP SP2, netsh can be used to repair the Windows network socket, or "Winsock". Before you try to fix Winsock, first use netsh to reset TCP/IP. Repairing Winsock is recommended if the Windows Firewall service won't start, or the Security Center won't open.
- Open a CMD prompt
- Type: netsh winsock reset and press Enter.
- Always reboot after running netsh winsock reset.
Display Network Settings
- Open a CMD prompt
- Type: netsh diag show all and press Enter.
Open a Network Diagnostics GUI
- Open a CMD prompt
- Type: netsh diag show gui and press Enter.
- In the Network Diagnostics window, set scanning options and then select 'Scan your system'.
Do a comprehensive system PING
- Open a CMD prompt
- Type: netsh diag ping adapter 1 and press Enter.
- This will ping will your the default gateway, the DHCP server, the DNS server(s) and your own IP address.