2021 Annual Petri Reader Survey - We want to know what's important to you! 2021 Annual Petri Reader Survey - We want to know what's important to you!
Windows Client OS

How to Back Up and Restore Wireless Network Profiles

Except for wireless profiles that are automatically configured by an organization, it can be useful to back up profiles so that they can be restored, along with passwords, if users switch to a different device. Today I’ll show you how to use the netsh command-line tool to display, back up, and restore wireless network profiles.

Back Up Wireless Network Profiles

Let’s start by listing the profiles configured on a device. Open a command prompt window and run the command line shown below.

netsh wlan show profiles

You’ll see a list of any profiles configured using Group Policy and those configured by the user. If you want more information about a profile, add its name to the command line.
netsh wlan show profile name="Starbucks"

Back up and restore wireless network profiles in Windows 10 (Image Credit: Russell Smith)
Back up and restore wireless network profiles in Windows 10 (Image Credit: Russell Smith)

Now let’s back up all the profiles on the device and their passwords. Each profile is backed up to a separate .xml file prefixed with ‘WiFi-‘.

netsh wlan export profile key=clear folder=c:\temp

Using the command above, passwords are stored in clear text. If you want to export profiles with encrypted passwords, remove key=clear from the command:
netsh wlan export profile folder=c:\temp

But if you remove key=clear from the command, you won’t be able to use netsh to restore the profile with the password. Exporting profiles with passwords in clear text can be useful if you want to quickly copy or set up a profile to another device but don’t know the Wi-Fi password.

You can export a specific profile by adding its name:

netsh wlan export profile "contosowifi" key=clear folder=c:\temp

Back up and restore wireless network profiles in Windows 10 (Image Credit: Russell Smith)
Back up and restore wireless network profiles in Windows 10 (Image Credit: Russell Smith)

Restore Wireless Network Profiles

Now that you have exported one or more wireless network profiles, you can use netsh to add those profiles to a system. The command below adds the contoso wireless profile for all users.

netsh wlan add profile filename="c:\temp\WiFi-contoso.xml" user=all

If you want to add a profile just for the current user, change the user parameter to current.
netsh wlan add profile filename="c:\temp\WiFi-contoso.xml" user=current

When you add a profile, you will be able to see it in the list if you run netsh wlan show profiles again. If the network is in range, the device will automatically connect.

 

Related Topics:

BECOME A PETRI MEMBER:

Don't have a login but want to join the conversation? Sign up for a Petri Account

Register
Comments (0)

Leave a Reply

IT consultant, Contributing Editor @PetriFeed, and trainer @Pluralsight. All about Microsoft, Office 365, Azure, and Windows Server.

Register for the Hybrid Identity Protection (HIP) Europe Conference!

Hybrid Identity Protection (HIP) Europe 2021 - Virtual Conference

Mobile workforces, cloud applications, and digitalization are changing every aspect of the modern enterprise. And with radical transformation come new business risks. Hybrid Identity Protection (HIP) is the premier educational forum for identity-centric practitioners. At the inaugural HIP Europe, join your local IAM experts and Microsoft MVPs to learn all the latest from the Hybrid Identity world.