How to Use netsh to Save and Restore Wi-Fi Profiles on Windows 11
🔍 WiseChecker

How to Use netsh to Save and Restore Wi-Fi Profiles on Windows 11

Quick fix: Export all Wi-Fi profiles to a folder with netsh wlan export profile folder="C:\WifiBackup" key=clear, then restore later with netsh wlan add profile filename="C:\WifiBackup\Wi-Fi-MyNet.xml". Migrates Wi-Fi credentials between PCs in seconds.

You’re moving Windows 11 to a new PC, doing a clean install, or want to back up 30 saved Wi-Fi passwords before a Reset. The Settings UI gives you no way to export profiles. The netsh wlan commands are the supported export/import path — they save each Wi-Fi profile as an XML file that includes the SSID, encryption type, and (with key=clear) the password in plain text.

Symptom: Need to back up, transfer, or restore Wi-Fi profiles between Windows 11 PCs.
Affects: Windows 11 (and Windows 10) Wi-Fi profile management.
Fix time: ~5 minutes for export, ~5 minutes for import.

ADVERTISEMENT

What causes this

Windows stores each Wi-Fi profile in a per-user store under C:\ProgramData\Microsoft\Wlansvc\Profiles\Interfaces. The format is XML, but the file itself is encrypted with a key tied to the local machine — you can’t copy the file directly to another PC. The netsh wlan export profile command outputs an unencrypted XML version that’s portable. The netsh wlan add profile command imports such XMLs on the destination machine.

Cross-PC backup, fleet imaging, and Reset preparation all use this same export/import dance.

Method 1: Export all Wi-Fi profiles to a folder

The bulk-backup command.

  1. Create a folder to hold the exported profiles. Example: C:\WifiBackup. (PowerShell: New-Item -Path C:\WifiBackup -ItemType Directory.)
  2. Open Terminal (Admin).
  3. Run the bulk export:
    netsh wlan export profile folder="C:\WifiBackup" key=clear

    key=clear writes the password in plain text inside the XML. Without it, the password is encrypted and won’t be importable elsewhere.

  4. Each profile is saved as Wi-Fi-<SSID>.xml. List them: Get-ChildItem C:\WifiBackup.
  5. Copy the folder to OneDrive, an external drive, or a network share for backup.
  6. To export a single profile by name: netsh wlan export profile name="Home WiFi" folder="C:\WifiBackup" key=clear.

The XML files are now portable and contain everything needed to re-import on any Windows PC.

ADVERTISEMENT

Method 2: Import Wi-Fi profiles on a new or reset PC

The restore side.

  1. Copy the exported XML files to the destination PC (e.g., C:\WifiBackup).
  2. Open Terminal (Admin) on the destination.
  3. Import a single profile:
    netsh wlan add profile filename="C:\WifiBackup\Wi-Fi-MyHomeNet.xml"
  4. For all profiles in the folder at once, use this PowerShell loop:
    Get-ChildItem -Path "C:\WifiBackup" -Filter *.xml | ForEach-Object {
        netsh wlan add profile filename=$_.FullName
    }
  5. By default, profiles are added for the current user only. To make them available to all users, add the user=all parameter:
    netsh wlan add profile filename="...xml" user=all
  6. Verify with netsh wlan show profiles — every imported profile should appear in the list.

The PC will auto-connect to any of the imported networks when they’re in range.

Method 3: Show a saved password from a single profile

For when you don’t need to migrate — you just forgot your own Wi-Fi password and want to see what Windows has stored.

  1. Open Terminal (Admin).
  2. List all saved profiles:
    netsh wlan show profiles

    Note the exact profile name (case-sensitive).

  3. Show the password for one:
    netsh wlan show profile name="Home WiFi" key=clear
  4. Look for the Key Content line in the output. That’s the password.
  5. For a quick-look at all profiles with passwords (use carefully — it prints passwords to screen):
    (netsh wlan show profiles) | Select-String '\:(.+)$' | %{$name=$_.Matches.Groups[1].Value.Trim(); $_} | %{(netsh wlan show profile name="$name" key=clear)} | Select-String 'Key Content\W+\:(.+)$' | %{$pass=$_.Matches.Groups[1].Value.Trim(); $_} | %{[PSCustomObject]@{ PROFILE_NAME=$name;PASSWORD=$pass }} | Format-Table -AutoSize

Useful for one-PC recovery or auditing saved networks before a wipe.

How to verify the fix worked

  • Run netsh wlan show profiles on the destination PC — every expected profile is listed.
  • Move to within range of a previously-saved network. Windows auto-connects within seconds.
  • Open Settings → Network & internet → Wi-Fi → Manage known networks — imported profiles are visible.

If none of these work

If import fails with “Profile name is invalid” or “The parameter is incorrect”, the XML file may have been edited or transferred via a method that altered line endings (Windows uses CRLF, transfer through Mac/Linux can convert to LF). Open the XML in Notepad and save as ANSI or UTF-8 to fix encoding. If the export command returned “The Wireless AutoConfig Service (wlansvc) is not running”, start it: net start wlansvc. For corporate networks that use 802.1X / RADIUS authentication, the exported XML usually doesn’t include the user certificate — you’ll need to re-authenticate on the new PC after import. For chronic export problems on a managed PC, IT may have blocked profile export via Group Policy; in that case you can’t back up profiles and must re-enter passwords manually.

Bottom line: netsh wlan export profile + key=clear dumps every Wi-Fi profile to portable XML; netsh wlan add profile imports them on any other PC. Fastest way to migrate Wi-Fi credentials.

ADVERTISEMENT