Windows 7 has got an intuitive GUI that makes you connect to any kind of Wireless network much easier than before. There is really no valid reason why you need or should use the command line to accomplish something that you can do the same through the GUI, other than, well, being cool. But anyway, let’s see how it works, all through the built-in netsh command.
The simple line of command is
C:\>netsh wlan connect name=102nd
Connection request was completed successfully
Replace 102nd with your own profile name, and you are good to go.
A more formal syntax of connecting to a wireless network is something like:
netsh wlan connect ssid=ssidname name=profilename
What is the Catch?
The real catch is the profile. It’s the file stores all the information necessary to get you connected.
To show what profiles are in your system:
C:\>netsh wlan show profile
All User Profile : 102nd
That is similar to the ones you often see in your wireless network dialog window.
You can export the profile through:
C:\>netsh wlan export profile name="102nd"
Interface profile "102nd" is saved in file ".\Wireless Network Connection-102nd.
Later on, you can import the same profile to the same or other computers.
C:\>netsh wlan add profile filename="wireless network connection-102nd.xml"
C:\>netsh wlan disconnect
Disconnection request was completed successfully for interface "Wireless Network
To Show More Wireless Info
The show option in Netsh provides many ways to show many information about your wireless network, more than you need in most cases. For example, you can show the complete wireless device and networks information from:
C:\>netsh wlan show all
You can also show the blocked network display settings from:
C:\>netsh wlan show blockednetworks
Or, show a list of network visible on the system:
C:\>netsh wlan show networks
Interface name : Wireless Network Connection
There are 3 networks currently visible.
SSID 1 : 102nd
Network type : Infrastructure
Authentication : WPA2-Personal
Encryption : CCMP
SSID 2 : cambian
Network type : Infrastructure
Authentication : Open
Encryption : WEP
You can even display the configuration script used in the wireless network.
C:\>netsh wlan dump
With a little trick, you can save the script to a file:
C:\>netsh wlan dump > myconfig.txt
Then, later on you can use this myconfig.txt file on other computer directly:
C:\>netsh exec myconfig.txt
Thanks to Scott Hanselman for sharing this tip.
Well, you can actually use Set switch to a number of settings relating to wireless network. Like enable/disable the autoconfig.
C:\>netsh wlan set autoconfig
Interesting to give it these a try? Enjoy!
- How To Block A Computer From Accessing To A Specific Wireless Network
- How To Turn Your Windows 8 Computer into A Wireless Hotspot Access Point
- A Small Hack Showing All Your Neighbor’s WiFi Profile in Windows 7, and How You Can Optimize Your Signal
- How To Reveal Saved Wireless Network Password in Windows 8
- Windows Network Command Line: PathPing