Back Up and Restore Saved Wi-Fi Profiles in Windows 10/11 with netsh

Back Up and Restore Saved Wi-Fi Profiles in Windows 10/11 with netsh​

Difficulty: Intermediate | Time Required: 10 minutes
Saved Wi-Fi profiles are easy to forget about until you reinstall Windows, move to a new PC, reset network settings, or need to configure several devices with the same wireless networks. Windows 10 and Windows 11 store Wi-Fi profile details such as the network name, connection mode, security type, and—if you choose to export it—the saved wireless key.
Using the built-in netsh wlan command, you can back up these profiles to XML files and later restore them on the same PC or another Windows device. This is especially useful before a clean install, hardware replacement, or troubleshooting session where you may remove network profiles.
Important: If you export Wi-Fi profiles with key=clear, saved Wi-Fi passwords may be stored in plain text inside the XML files. Treat these backups like passwords: store them securely, delete them when no longer needed, and do not share them publicly.

Prerequisites​

Before you begin, make sure you have:
  1. A Windows 10 or Windows 11 PC with saved Wi-Fi profiles.
  2. Access to Command Prompt, PowerShell, or Windows Terminal.
  3. An account with administrator rights if you want to export saved keys in readable form.
  4. A secure folder, USB drive, or encrypted backup location for the exported XML files.
This tutorial applies to supported versions of Windows 10 and Windows 11. The commands shown work in Command Prompt, PowerShell, and Windows Terminal.

Part 1: View Saved Wi-Fi Profiles​

  1. Open Start.
  2. Type:
    cmd
  3. Right-click Command Prompt and select Run as administrator.
    You can also use Windows Terminal or PowerShell as administrator.
  4. Run the following command:
    netsh wlan show profiles
  5. Review the list under User profiles.
    You should see entries similar to:
    Code:
    All User Profile     : HomeWiFi
    All User Profile     : OfficeWiFi
    All User Profile     : GuestNetwork
These are the wireless profiles currently saved on the computer.
Tip: The profile name usually matches the Wi-Fi network name, but not always. Use the exact profile name shown by netsh when exporting a single profile.

Part 2: Create a Backup Folder​

Before exporting, create a folder to hold the XML files.
  1. Open File Explorer.
  2. Create a folder such as:
    C:\WiFiBackup
  3. If you plan to move the backup to another PC, you can later copy this folder to a USB drive or secure cloud storage.
You can also create the folder from Command Prompt:
mkdir C:\WiFiBackup
Note: The export folder must already exist. If the folder does not exist, the export command may fail.

Part 3: Back Up All Saved Wi-Fi Profiles​

To export all saved Wi-Fi profiles, run:
netsh wlan export profile folder="C:\WiFiBackup"
Windows will create one XML file per profile. The file names usually include the wireless interface name and the profile name, such as:
Code:
Wi-Fi-HomeWiFi.xml
Wi-Fi-OfficeWiFi.xml
This exports the profile configuration, but saved passwords may remain encrypted or unavailable for use on another device.

Part 4: Back Up Profiles Including Wi-Fi Passwords​

If you want the restored profiles to include saved pre-shared keys, export them using key=clear:
netsh wlan export profile folder="C:\WiFiBackup" key=clear
To export only one specific profile, use:
netsh wlan export profile name="HomeWiFi" folder="C:\WiFiBackup" key=clear
Replace HomeWiFi with the exact profile name from netsh wlan show profiles.
Warning: key=clear may place the Wi-Fi password in readable text inside the XML file. Anyone who can open the file may be able to view the wireless key. Store the backup in a secure location, such as an encrypted drive or password-protected archive.

Part 5: Verify the Backup​

  1. Open the backup folder:
    C:\WiFiBackup
  2. Confirm that XML files were created.
  3. Optional: Open one XML file in Notepad to verify it contains the expected network name.
If you exported with key=clear, avoid leaving the file open or copying its contents into forum posts, screenshots, or shared documents.

Part 6: Restore a Wi-Fi Profile​

To restore a profile from an XML file, use the add profile command.
  1. Open Command Prompt as administrator.
  2. Run:
    netsh wlan add profile filename="C:\WiFiBackup\Wi-Fi-HomeWiFi.xml"
  3. If successful, Windows should report that the profile was added.
By default, profiles are commonly added for all users. You can specify the profile scope manually.
To restore for the current user only:
netsh wlan add profile filename="C:\WiFiBackup\Wi-Fi-HomeWiFi.xml" user=current
To restore for all users:
netsh wlan add profile filename="C:\WiFiBackup\Wi-Fi-HomeWiFi.xml" user=all
Tip: If you are restoring profiles on a shared or work computer, use user=current unless you specifically want all users on the device to have access to the profile.

Part 7: Restore Multiple Profiles​

If you backed up several XML files, you can import them one at a time:
Code:
netsh wlan add profile filename="C:\WiFiBackup\Wi-Fi-HomeWiFi.xml" user=all
netsh wlan add profile filename="C:\WiFiBackup\Wi-Fi-OfficeWiFi.xml" user=all
netsh wlan add profile filename="C:\WiFiBackup\Wi-Fi-GuestNetwork.xml" user=all
If you are comfortable with PowerShell, you can import every XML file in the folder with:
Code:
Get-ChildItem "C:\WiFiBackup\*.xml" | ForEach-Object {
    netsh wlan add profile filename="$($_.FullName)" user=all
}
This is handy after a clean install when you have several saved networks to restore.

Part 8: Connect to a Restored Network​

After restoring a profile, Windows may connect automatically if the profile is configured for automatic connection and the network is in range.
To manually connect, run:
netsh wlan connect name="HomeWiFi"
If your PC has more than one wireless adapter, specify the interface:
netsh wlan connect name="HomeWiFi" interface="Wi-Fi"
You can check the wireless interface name with:
netsh wlan show interfaces

Troubleshooting​

“The system cannot find the path specified”​

Check that the folder or XML file path is correct. If the path contains spaces, keep it inside quotation marks.
Example:
netsh wlan add profile filename="D:\Network Backups\Wi-Fi-HomeWiFi.xml"

“The profile was not added”​

Make sure the XML file was not edited incorrectly. If the file came from another PC, verify it was copied completely and is not blocked by security software.

Restored profile asks for the Wi-Fi password​

The exported profile may not include the usable wireless key. Re-export the original profile with:
netsh wlan export profile name="HomeWiFi" folder="C:\WiFiBackup" key=clear
Then restore the newly exported XML file.

The network does not appear after importing​

Run:
netsh wlan show profiles
If the profile appears in the list, it was imported. The Wi-Fi network itself may simply be out of range, hidden, disabled, or using a different SSID.

Command works in Command Prompt but not PowerShell​

PowerShell usually runs netsh commands fine, but paths and quotation marks can sometimes be easier to test in Command Prompt. If you run into issues, try the same command from an elevated Command Prompt window.

Best Practices​

  • Store exported Wi-Fi profiles in a secure location.
  • Use key=clear only when you need to preserve saved Wi-Fi passwords.
  • Delete unneeded XML files that contain wireless keys.
  • Keep a copy before reinstalling Windows or resetting network settings.
  • Label your backup folder with the PC name and date, such as WiFiBackup-Laptop-May2026.
  • Avoid posting exported XML contents online, especially if they include key material.

Conclusion​

Backing up and restoring saved Wi-Fi profiles with netsh wlan is a quick way to avoid manually re-entering network names and passwords after a reset, reinstall, or PC migration. With just a few commands, you can export your wireless profiles to XML files, securely store them, and import them again whenever needed.
Used carefully, this method is simple, reliable, and especially helpful for power users, technicians, and anyone who regularly sets up Windows 10 or Windows 11 systems.
Key Takeaways:
  • You can list saved Wi-Fi profiles with netsh wlan show profiles.
  • Use netsh wlan export profile to back up profiles as XML files.
  • Add key=clear only if you need saved Wi-Fi passwords included.
  • Restore profiles with netsh wlan add profile filename="path-to-file.xml".
  • Protect exported XML files because they may contain sensitive wireless credentials.

This tutorial was generated to help WindowsForum.com users get the most out of their Windows experience.
 

Back
Top