Posted on February 17, 2014 · Posted in Windows 8

Wireless Network Management in Windows 8

In Windows 8 (like in previous Windows versions) the system automatically creates a separate Wi-Fi profile for a network in case of a successful connection. This profile contains all information necessary to set a wireless connection: a network name (SSID), an authentication method, a password key and some other data. Later, if this Wi-Fi  network is detected, this profile is used to automatically connect to it.

Windows 7 had a special element on the Control Panel that allowed to manage wireless network profiles (Manage Wireless Network): you could delete them, change their settings or priority. Microsoft decided to remove this opportunity in Windows 8 for some reason, so in Windows 8 you can manage Wi-Fi profiles using either third-party tools (this is not our way!) or the command line.

Thus, in Windows 8 you can manage wireless networks using the command line and the command netsh will help us to do it.

How to Display all Saved Wi-Fi Profiles

The list of wireless network profiles is shown after entering the following command:

netsh wlan show profiles

It returns the list of saved profiles of wireless Wi-Fi networks. This sample shows only one profile of Wi-Fi network with the name michel.

netsh show wifi profiles in windows 8

How to View Saved Passwords for Wi-Fi Networks in Windows 8

Perhaps, no surprise is that the system stores a password key (a password to enter the network) for a convenience sake.

You can view the saved password key to a Wi-Fi network (WPA, WEP, etc.) right from the command line using netsh command and specifying the necessary profile:

netsh wlan show profiles name= michel key=clear

You can see a Wi-Fi password (key) in Security settings ->Key Content. In our case the password for a Wi-Fi access point is tstwifikey. netsh profile properties with wifi key

How to Delete a Wi-Fi Connection Profile in Windows 8

You can delete a saved wireless connection profile in Windows 8 using the following command:

netsh wlan delete profile name=[profile name]

This command will delete all saved profiles for all WLAN interfaces.
If you have to delete a wi-fi netfork profile of a certain WLAN interface, use this command:

netsh wlan delete profile name=[profile name] interface=[interface name]

delete wifi profile in windows8

Note. Wireless network profiles in Windows 8 are stored as XML files in the directory C:\ProgramData\Microsoft\Wlansvc\Profiles\Interfaces\{interface_GUID}\{profile_GUID }.xml
Each Wi-Fi adapter has its own interface GUID {interface_GUID}, and all saved profiles for this interface are stored in an XML file with {profile_GUID} as a name. To delete the data on a certain wireless profile, you just have to delete a corresponding XML file.

How to Connect to a Wireless Network in Windows 8 Using the Command Line

Only if the system has the necessary profile, you can connect to a wireless network in Windows 8 using the command line. To do it, use the following command:

netsh wlan connect name=[profile name]

If you have to connect to the network saved in the profile (how to get the list of all profiles in the system is described above) under the name wIrЗ1З$$, run the command:

netsh wlan connect name="wIrЗ1З$"

netsh connect to wlan from command prompt

You can also specify a definite interface to connect to a Wi-Fi network. In this case the command looks like that:

netsh wlan connect interface="Wireless Network Connection 3"

How to Disconnect from a Wi-Fi Network

To disconnect from a wireless network, use the command:

netsh wlan disconnect

Or specify a certain interface:

netsh wlan disconnect interface="Wireless Network Connection 3"

How to Change the Priority of Wireless Networks in Windows 8

If there are several Wi-Fi networks in the area, the priority of wireless connections is determined as follows: the last connection gets the highest priority if the Connect automatically item is selected. If this network is not available, Windows 8 tries to use the previous prior Wi-Fi network. In case of successful connection the priority of this network becomes higher.

Note. If there are several connections, by default Windows 8 tries to connect firstly by Ethernet. If it is impossible, it tries to connect by Wi-Fi. If both connection types are not available, Windows 8 connects to a mobile network.

You can see the current priority for wireless networks with a familiar command:

netsh wlan show profiles

The higher the profile is in the list, the higher its priority is. To change the priority of one of the Wi-Fi networks, use the following command:

netsh wlan set profileorder name=”wIrЗ1З$" interface=”Wireless Network Connection 1” priority=1

This command increases the priority of the wireless network wIrЗ1З$$ for the interface Wireless Network Connection 1 to the maximum (1). wi-fi priority netsh windows 8

If you look through the list of all network profiles again, you can see that the wIrЗ1З$$ priority was increased (it is on top of the list).

show wifi profiles priority

How to Migrate Wi-Fi Network Profiles Between Computers Running Windows 8

To transfer the existing Wi-Fi profile from one computer to another, you have to export it to an XML file and then import it on another computer.

Again, we can use netsh tool, that allows to perform export and import of wireless network settings (profiles) in the XML file.

Let’s export Wi-Fi profile settings:

netsh wlan export profile name=”wIrЗ1З$” folder=c:\wifi_bakup

Then in the c:\wifi_bakup directory a XML file appears, which should be copied to another computer and imported using the command:

netsh wlan add profile filename=”c:\wifi_bakup\WiFi_profile_name.xml”

These commands allow to backup all Wi-Fi profiles on the computer.

Related Articles