Two laptops with glowing Wi-Fi network names transferring between them, illustrating moving saved Wi-Fi passwords from an old Windows computer to a new one.
Tech tips

How to Export and Import All Your Saved Wi-Fi Passwords to a New Windows Computer

If you've had the same Windows computer for a few years, you've probably built up a small library of saved Wi-Fi passwords without ever noticing it. Your home network, a client's office, your in-laws' guest network, a vendor's lobby — Windows quietly remembers all of them so you never have to type a password twice.

The catch shows up the day you get a new computer. All of that quietly-saved convenience stays behind on the old one, and you're left either digging through router labels and old text messages, or standing in someone's office asking, "What's the Wi-Fi password again?"

The short version: Windows already has a built-in way to grab every saved Wi-Fi profile at once and hand them all to a new computer in one shot — no downloads, no third-party apps, nothing to install. The tool is called netsh, and it's been quietly built into Windows for over 20 years. To give credit, netsh isn't just used for this particular task but it is a Windows command-line utility that is used to view, configure, manage, and troubleshoot network components and server roles.

What You'll Need

Just the two Windows computers, a way to get a folder from one to the other — a USB flash drive, a private cloud folder, or even a quick email to yourself all work fine — and about two minutes. For security sake, a transfer via a physical removable media (USB flash drive, external hard disk drive etc) is the best medium so your saved credentials are not exposed to the cloud in any shape or form.


Step 1: Export Every Saved Wi-Fi Profile From Your Old Computer

  1. Open the Run window. On your keyboard, press the Windows Key + R at the same time. A small box labeled "Run" will pop up in the bottom-left corner of your screen.
The Windows Run dialog with 'cmd' typed into the Open field
The Run dialog — type 'cmd' and press Enter.
  1. Open the Command Prompt. In that text box, type `cmd` and hit Enter. A black window (the Command Prompt) will open.
  2. Paste the export command. Copy the exact line of text below, paste it directly into that black window, and press Enter:
mkdir "%USERPROFILE%\Desktop\WiFi-Profiles-Backup" 2>nul & netsh wlan export profile key=clear folder="%USERPROFILE%\Desktop\WiFi-Profiles-Backup"
  1. Watch for the confirmations. You'll see one line per saved network, each ending in something like "is saved in file ... successfully." That's normal — it's not an error, it just means Windows is exporting one file per network it has stored.
Command Prompt showing successful Wi-Fi profile export messages for multiple networks
Successful export confirmations — one line per saved Wi-Fi network.

What That Command Is Actually Doing (and Why It's Not Doing Anything Sketchy)

It looks like a lot packed into one line, so here's what each piece is responsible for:

  • mkdir "%USERPROFILE%\Desktop\WiFi-Profiles-Backup" — creates a new folder named "WiFi-Profiles-Backup" right on the desktop of whichever account is currently logged in. %USERPROFILE% is a built-in Windows shortcut that always points to the current user's own folder, so this works correctly no matter what your Windows username actually is.
  • 2>nul — a "quiet mode" flag. If you ever run this a second time and the folder already exists, mkdir would normally show a small message like "A subdirectory or file already exists." This just hides that message so it doesn't look alarming. It doesn't touch any files or settings.
  • & — simply runs two commands back-to-back on one line, instead of typing them separately and pressing Enter twice.
  • netsh wlan export profile — the part actually doing the work. netsh (short for "network shell") is a command that's been built into every version of Windows for more than two decades and wlan export profile tells it specifically to save a copy of your saved wireless network profiles.
  • key=clear — by default, Windows would export the file with the password scrambled so it can't be reused elsewhere. This tells netsh to include the actual password in plain, readable text instead — which is the whole reason this works for moving networks to a new computer, and exactly why the caution above matters.
  • folder="%USERPROFILE%\Desktop\WiFi-Profiles-Backup" — tells netsh exactly where to save all of the exported files: the folder created a moment earlier in the same line.

None of this reaches out to the internet, installs anything, or changes any of your existing network settings. It only reads what Windows already had saved and writes a copy of it to a folder you can see and control.

Once it finishes, open the new WiFi-Profiles-Backup folder on your Desktop. You'll see one XML file per network, named to match — with "Wi-Fi-" added to the front and ".xml" added to the end automatically. So a network called "Office Private Network" would show up as a file named Wi-Fi-Office Private Network.xml .


Getting the Backup Folder to Your New Computer

Copy the whole WiFi-Profiles-Backup folder over using whatever's easiest — a USB flash drive, a private cloud folder, an external drive. Since the files contain readable passwords, it's worth avoiding anything public or shared, like a drive other people at the office can browse.


Step 2: Import All the Profiles on the New Computer

  1. Open the Run window the same way — Windows Key + R — type cmd and hit Enter to open Command Prompt.
  2. Paste the import command below and press Enter:
for %f in ("%USERPROFILE%\Desktop\WiFi-Profiles-Backup\*.xml") do netsh wlan add profile filename="%f" user=all
  1. Just like before, you'll see a confirmation line for each network as it's added back in.
Command Prompt showing successful Wi-Fi profile import messages for multiple networks
Successful import confirmations — each network is added back one at a time.

What That Command Is Actually Doing

  • for %f in (...) do ... — has Command Prompt loop through a whole list of files automatically, instead of you typing one line per network by hand. `%f` is just a temporary placeholder name that Command Prompt fills in with each file it finds as it goes.
  • "%USERPROFILE%\Desktop\WiFi-Profiles-Backup\*.xml" — tells that loop to look inside the backup folder for every file ending in `.xml`. The asterisk (*) means "anything," so it matches every single exported Wi-Fi profile regardless of what the network is named.
  • netsh wlan add profile — the counterpart to the export command from Step 1. It tells Windows to read one of these XML files and add it as a saved wireless network.
  • filename="%f" — plugs in whichever file the loop is currently working on.
  • user=all — makes the network available to every account on that computer, not just whichever one happens to be logged in when the command runs. Handy on a shared or family computer.

Because it's a loop, this one line reads and re-adds every XML file in the folder in a single pass — so however many networks accumulated on the old computer over the years, that's how many come back in seconds on the new one.


One Important Limit: Enterprise Wi-Fi Doesn't Come Along as Easily

This method works beautifully for the kind of Wi-Fi almost every home and small office uses which is standard WPA, WPA2, or WPA3 personal networks with one shared password.

If your office instead uses enterprise-style Wi-Fi login — the kind tied to 802.1X, digital certificates, smart cards, or a RADIUS server, usually paired with signing in using your own personal Windows or network username rather than one shared password — netsh can export much of that network's configuration, but it generally won't hand over a reusable copy of protected user credentials or private certificate keys through this same XML export. That part needs separate, manual handling, and it's a bit beyond what a two-minute blog post can responsibly walk through. If that sounds like your setup, it's worth having someone look at it directly with you.


A Small Thing That Saves a Real Headache

This is one of those small technical annoyances that's genuinely worth two minutes of copy-pasting, especially if a new-computer refresh is already on your calendar. If you've got a whole office full of computers about to make that jump — or a Wi-Fi setup that could use a second look while you're at it — that's exactly the kind of thing we help with every day. Give us a call or drop us a line, no pressure, no sales pitch.


For Further Reading

Call (954) 274-9020