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!
Latest posts by Kent Chen (see all)
- Windows 10 Quick Tip: How To Display All CPU Cores Performance in Task Manager - March 23, 2017
- How To Batch Convert Outlook MSG Files into PDF Files on Windows - March 22, 2017
- Disabling OneDrive Ads from Displaying in File Explorer in Windows 10 - March 21, 2017
Last updated: 08/04/2014