10 things you should know about the NETSH tool
Techrepublic | 11/19/06
by Rick Vanover
As a networking professional in Windows environments netsh is an indispensable tool
10 things you should know about the NETSH tool.
NETSH is one of the most powerful tools in the Windows networking toolkit. This list will introduce you to some good uses of NETSH in various scenarios and show you how you can streamline your networking configuration, administration, and documentation.
My favorite uses include writing netsh .cmd files that can change a static IP address, or change the adapter into DHCP mode. When working with multiple LANs or VLANs these bat files are a real timesaver.
Example 1: (Set static IP of 192.168.0.01/24)
netsh interface ip set address “local area connection” static 192.168.0.101 255.255.255.0 192.168.0.1 1
netsh interface ip set dns “local area connection” static 22.214.171.124
netsh interface ip add dns “Local Area Connection” 126.96.36.199
Example 2: (Set DHCP IP)
netsh interface ip set address “local area connection” dhcp
netsh interface ip set dns “local area connection” dhcp
Another great user of netsh is the netsh diag commands.
Example 3: (Pings IP, DG, DNS1, DNS2)
netsh diag ping adapter 1
Example 4: (Same utility w/ GUI)
netsh diag gui