Back up saved Wi-Fi networks (and see their passwords) — via Microsoft Learn
Export every saved Wi-Fi network to XML files you can import on a new PC. Adding key=clear, run as administrator, includes the password in plain text — also the quickest way to recover a forgotten Wi-Fi password.
Takes effect right away
Command
Run in an administrator Command Prompt / Terminal window.
mkdir C:\WiFiBackup
netsh wlan show profiles
netsh wlan export profile folder=C:\WiFiBackup key=clearUndo
rmdir /s /q C:\WiFiBackupTo restore on another PC:netsh wlan add profile filename="C:\WiFiBackup\Wi-Fi-NAME.xml". Addname="NAME"to export just one network. The files contain passwords in plain text — keep them somewhere private and delete them when finished. Without admin rights orkey=clearthe key is encrypted in the file.
Sources
- netsh wlan — export profile and add profile — by Microsoft Learn
- Create the XML file from an existing Wi-Fi connection — by Microsoft Learn (Intune)
- Source reviewed
- 2026-11-02
- Link checked
- 2026-11-02
- Tested hands-on
- Not by Oddbyte.Me
Oddbyte.Me hasn't tried this on every Windows build, so keep the undo handy.