About Netsh

About Netsh

What’s Netsh?

Netsh is a command-line scripting utility that allows you modify or script the network configuration. You can add, remove, change, import and export general configuration.

How to check the connection and opened port

netsh -c diag
netsh diag>connect iphost wilde.
net 80
IPHost (
IPHost =
Port = 80
Server appears to be running on port(s) [80]

How to configure the TCP/IP protocol

The following command configures the interface named intranet with the static IP address, the subnet mask of, and a default gateway of

netsh interface ip set address name=”intranet” source=static addr= mask= gateway=

How to configure Wireless using netsh

To configure an defined wireless network, use this command
netsh wlan connect ssid=”mySSID” name=”WLAN-wilde

To show your current wireless settings, use this command
netsh wlan show settings

To add an already exported wireless network profile, use this command
netsh wlan add profile filename=”Wireless Network Connection-BOW.xml”

How to export and import network configuration to a file (like informed in my last post)

To export your configuration, just do
netsh –c interface dump > test.txt

When you  import this configuration, use this command
netsh exec test.txt

This article was originally written by:
João Ricardo Wilde Neto

Please note that English is my second language.
I am trying my best here, but just in case you read an odd sounding sentence every now and then, I hope you will pardon me.

Leave a Comment
  • Please add 8 and 6 and type the answer here:
  • Post
Wiki - Revision Comment List(Revision Comment)
Sort by: Published Date | Most Recent | Most Useful
Page 1 of 1 (2 items)
Wikis - Comment List
Sort by: Published Date | Most Recent | Most Useful
Posting comments is temporarily disabled until 10:00am PST on Saturday, December 14th. Thank you for your patience.
Page 1 of 1 (2 items)