Troubleshooting Network Connections with Netsh

by Chris Sanders [Published on 21 Dec. 2006 / Last Updated on 21 Dec. 2006]

Netsh is a very simple to use command-line utility that can make troubleshooting connectivity issues a breeze.

Netsh is a very powerful command line utility that can be used to configure dozens of various network related settings. This utility also has a lot of value when it comes to network connectivity troubleshooting as well.

One of my favorite commands to run on a computer that has suspected network problems is “netsh diag gui”. This command when run will present a nicely formatted html page that can be used to run a complete network status scan on a computer. This report displays everything from network addresses, associated DHCP servers, server roles, and Outlook settings. There really isn’t too much network related information that can’t be obtained from this netsh command.

Another of my favorite netsh troubleshooting commands is one I often use on machines that are heavily infected with spyware. This spyware often tends to find ways to mess up the TCP/IP stack and therefore cause very strange and erratic network communication problems. When this happens netsh provides two commands that can help you out. The first of these commands is “netsh winsock reset”. Running this and then restarting your computer will usually yield positive results as it is designed to rebuild the TCP/IP stacks Winsock catalog. This catalog is often the source of spyware related network issues. If for some reason this doesn’t work, netsh provides functionality that will allow for a complete rebuild of the TCP/IP stack. To do this, you can type “netsh int ip reset” at a command prompt. Following this, you should restart your computer.

A combination of these commands should provide a very valuable resource for your troubleshooting toolkit.


Chris Sanders is the network administrator for one of the largest public school systems in the state of Kentucky. Chris's specialties include general network administration, windows server 2003, wireless networking, and security. You can view Chris' personal website at

See Also

The Author — Chris Sanders

Chris Sanders is a network security analyst for EWA Government Systems Inc. Chris is the author of the book Practical Packet Analysis as well as several technical articles. His personal website at contains a great deal of information, articles, and guides related to network administration, network security, packet analysis, and general information technology.

Featured Links