Back Up and Restore Saved Wi-Fi Profiles in Windows 10/11 with netsh
Difficulty: Intermediate | Time Required: 10 minutesSaved 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 withkey=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:- A Windows 10 or Windows 11 PC with saved Wi-Fi profiles.
- Access to Command Prompt, PowerShell, or Windows Terminal.
- An account with administrator rights if you want to export saved keys in readable form.
- A secure folder, USB drive, or encrypted backup location for the exported XML files.
Part 1: View Saved Wi-Fi Profiles
- Open Start.
- Type:
cmd - Right-click Command Prompt and select Run as administrator.
You can also use Windows Terminal or PowerShell as administrator. - Run the following command:
netsh wlan show profiles - 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
Tip: The profile name usually matches the Wi-Fi network name, but not always. Use the exact profile name shown bynetshwhen exporting a single profile.
Part 2: Create a Backup Folder
Before exporting, create a folder to hold the XML files.- Open File Explorer.
- Create a folder such as:
C:\WiFiBackup - If you plan to move the backup to another PC, you can later copy this folder to a USB drive or secure cloud storage.
mkdir C:\WiFiBackupNote: 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
Part 4: Back Up Profiles Including Wi-Fi Passwords
If you want the restored profiles to include saved pre-shared keys, export them usingkey=clear:netsh wlan export profile folder="C:\WiFiBackup" key=clearTo export only one specific profile, use:
netsh wlan export profile name="HomeWiFi" folder="C:\WiFiBackup" key=clearReplace
HomeWiFi with the exact profile name from netsh wlan show profiles.Warning:key=clearmay 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
- Open the backup folder:
C:\WiFiBackup - Confirm that XML files were created.
- Optional: Open one XML file in Notepad to verify it contains the expected network name.
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 theadd profile command.- Open Command Prompt as administrator.
- Run:
netsh wlan add profile filename="C:\WiFiBackup\Wi-Fi-HomeWiFi.xml" - If successful, Windows should report that the profile was added.
To restore for the current user only:
netsh wlan add profile filename="C:\WiFiBackup\Wi-Fi-HomeWiFi.xml" user=currentTo restore for all users:
netsh wlan add profile filename="C:\WiFiBackup\Wi-Fi-HomeWiFi.xml" user=allTip: If you are restoring profiles on a shared or work computer, useuser=currentunless 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
Code:
Get-ChildItem "C:\WiFiBackup\*.xml" | ForEach-Object {
netsh wlan add profile filename="$($_.FullName)" user=all
}
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 interfacesTroubleshooting
“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=clearThen restore the newly exported XML file.
The network does not appear after importing
Run:netsh wlan show profilesIf 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 runsnetsh 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=clearonly 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 withnetsh 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 profileto back up profiles as XML files. - Add
key=clearonly 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.