Last updated on November 9th, 2026 at 02:07 pm
Command Prompt in Windows 10 can reveal one kind of stored password directly: the key for any Wi-Fi network your PC has saved. Run netsh wlan show profiles to list the networks, then netsh wlan show profile name="NetworkName" key=clear in an administrator Command Prompt, and read the line labeled Key Content. For other saved sign-ins, cmdkey /list shows what Windows has stored but never the passwords, and Credential Manager (which you can open from CMD) can show saved website passwords after you confirm your identity.
Applies to: Windows 10 version 22H2, using Command Prompt, Windows PowerShell or Windows Terminal. The same commands work in Windows 11.
Only do this on your own PC, or with the owner’s permission.
What CMD can and can’t show
| Saved item | Where Windows keeps it | What Command Prompt can do |
|---|---|---|
| Wi-Fi network keys | Wireless network profiles | Show the password with netsh wlan (administrator needed) |
| Shared folders, mapped drives, Remote Desktop hosts | Credential Manager, Windows Credentials | List targets and user names with cmdkey /list, no passwords |
| Websites saved by older Microsoft browsers and some apps | Credential Manager, Web Credentials | Open Credential Manager, where Show reveals the password |
| Passwords saved in Edge, Chrome or Firefox | The browser’s own password manager | Nothing; use the browser’s settings |
| Your Windows sign-in password or PIN | Not stored in a readable form | Nothing; reset it instead |
Before you start: open an administrator Command Prompt
The Wi-Fi command only prints the key when Command Prompt runs with administrator rights, so start there:
- Click Start (or the search box on the taskbar) and type cmd.
- Right-click Command Prompt in the results and choose Run as administrator.
- Click Yes in the User Account Control box. If Windows asks for an administrator password instead, you’re on a standard account and need an administrator’s help.
The window title should begin with Administrator:. If that doesn’t happen, the other ways to start it are in opening Command Prompt in Windows 10.
Method 1: Show a saved Wi-Fi password with netsh
- In the administrator window, type
netsh wlan show profilesand press Enter. Every network your PC remembers appears under User profiles as All User Profile : NetworkName.

- Type
netsh wlan show profile name="NetworkName" key=clear, replacing NetworkName with the exact name from the list. Keep the quotation marks; they’re required when the name contains spaces. For a network called Alex Home 5G, that’snetsh wlan show profile name="Alex Home 5G" key=clear. - Press Enter and scroll to the Security settings section.
- Read the password next to Key Content. The Authentication line just above it shows the security type, such as WPA2-Personal.

Microsoft’s netsh WLAN reference explains why the window matters: with key=clear, the plain-text key appears only if one is stored in the profile and you have administrative rights on the PC.
The network doesn’t need to be in range; any profile in the list works. A network you’ve never joined, or one you’ve told Windows to forget, has no profile and no key to show.
Get every Wi-Fi key at once
To collect all saved keys, export the profiles to a folder:
- Create a folder, for example by typing
mkdir C:\WiFi. - Run
netsh wlan export profile folder=C:\WiFi key=clear. Windows writes one XML file per network. - Open a file in Notepad and find the keyMaterial line; the text between the tags is the password.
According to Microsoft’s netsh wlan command reference, the key is saved in plain text only when a local administrator runs the export; otherwise it’s encrypted in the file. Those files are readable by anyone who opens them, so delete the folder (and empty the Recycle Bin) as soon as you’ve copied what you need.
Just the password line, in PowerShell
In an administrator Windows PowerShell or Terminal window, the same netsh commands work. Adding a filter trims the output to one line: netsh wlan show profile name="NetworkName" key=clear | Select-String "Key Content".
If you’d rather click than type, you can also see the Wi-Fi password on Windows 10 from the network’s Wireless Properties.
Is there a single command that shows every password on the PC?
No. Windows has no built-in command that prints all stored passwords. netsh covers Wi-Fi keys only, cmdkey lists saved sign-ins without passwords, and browser passwords need the browser. Downloads that promise to dump everything at once can carry malware, so skip them.
What is the DefaultPassword value people mention in the registry?
It exists only if someone set up automatic sign-in by editing the registry. Microsoft’s automatic logon article warns that the password is then stored in plain text under the Winlogon key. On most home PCs the value isn’t there at all. If it is, consider turning automatic sign-in off rather than leaving the password exposed.
Does the same method work on Windows 11?
Yes, the netsh and cmdkey commands are identical. Windows 11 adds a few more menu routes, covered in finding stored passwords on Windows 11.
Method 2: List saved sign-ins with cmdkey
Windows remembers user names and passwords for things like a NAS, a shared folder on another PC or a Remote Desktop host. To see what’s stored for your account:
- Open Command Prompt. This one doesn’t need administrator rights.
- Type
cmdkey /listand press Enter. - Read each entry’s Target (the server or service, such as a NAS called NAS01 or a Remote Desktop host called pc-jordan), its Type and its User.

You won’t see a password column. Microsoft’s cmdkey documentation states that “passwords are not displayed after they’re stored,” and there’s no switch that changes that. What cmdkey is good for is spotting which accounts Windows signs in to automatically and removing old ones:
cmdkey /list:NAS01shows a single entry.cmdkey /delete:NAS01removes it. Use the target name exactly as the list shows it.
Deleting a stale entry is often the fix when a shared drive keeps rejecting a new password. The full cleanup process, including clearing everything at once, is in clearing cached credentials in Windows 10.
Method 3: Open Credential Manager from CMD to reveal web passwords
Credential Manager is the Control Panel tool behind cmdkey, and it can reveal saved website passwords.
- In Command Prompt, type
control /name Microsoft.CredentialManagerand press Enter. If nothing opens, type credential manager in the taskbar search box and select Credential Manager Control panel, as Microsoft’s Credential Manager page describes. - Select Web Credentials.
- Click the arrow beside an entry to expand it, then click Show next to the password.
- Confirm with your Windows password or PIN when prompted. The password appears in place of the dots.

Under Windows Credentials (the same entries cmdkey lists), each item typically offers only Edit and Remove, so the password stays hidden. Don’t be surprised if Web Credentials is nearly empty: current browsers keep their passwords elsewhere (see Method 4).
A second command opens the older Stored User Names and Passwords dialog: rundll32.exe keymgr.dll,KRShowKeyMgr. It lists the same Windows credentials and lets you add, edit, remove, back up or restore them, but it has no option to display a password either. It doesn’t need administrator rights.
Method 4: Passwords saved in your browser
Most website passwords today live inside the browser, where CMD can’t reach them. Open the browser’s own manager instead:
- Microsoft Edge: select the three dots > Settings > Passwords and autofill > Microsoft Password Manager, open a site, then select the eye icon. You may be asked for your device PIN or password (Microsoft’s steps).
- Google Chrome: select the three dots > Passwords and autofill > Google Password Manager, choose a site, then Show password (Chrome Help).
- Firefox: open the menu, select Passwords, choose a site and click the eye icon. Windows may ask you to sign in first (Firefox Help).
For every other place Windows 10 keeps passwords, with menus rather than commands, see finding saved passwords on Windows 10.
When a command doesn’t show what you expect
“The Wireless AutoConfig Service (wlansvc) is not running”
Windows can’t see a working Wi-Fi adapter (a wired-only desktop shows this too), or the service is stopped. Turn Wi-Fi on, check the adapter under Network adapters in Device Manager, and restart.
“Profile “NetworkName” is not found on the system”
The name doesn’t match exactly. Copy it from the netsh wlan show profiles list, including capital letters, spaces and symbols, and wrap it in quotation marks.
Key Content is missing
First, check the title bar says Administrator:; a normal window hides the key. If it’s still missing in an admin window, look at the Authentication line. Work and school networks that use WPA2-Enterprise sign you in with a user name and password instead of a shared key, so there’s no key to show. Ask the network’s IT staff. An open network with no password also has no Key Content line.
cmdkey shows nothing, or won’t delete an entry
If cmdkey /delete fails, the target name you typed doesn’t match an entry; copy it from cmdkey /list, including any prefix. An empty list means nothing is saved for the account you’re signed in to. Credentials are stored per user, so another account on the PC has its own list.
Web Credentials has no Show button, or it won’t accept your PIN
Make sure you’re in Web Credentials, not Windows Credentials. If the PIN is refused, try your account password, and confirm you’re signed in to the account that saved the item.
Check your work and clean up
You’ve succeeded when the Wi-Fi password connects another device, or when the entries you removed no longer appear in cmdkey /list. Then tidy up:
- Close the Command Prompt window, since the key stays visible in its history until you do. Press Windows + L to lock the PC when you step away.
- Delete any text or XML files you created that hold passwords, then empty the Recycle Bin.
- Remove networks you’ll never use again with
netsh wlan delete profile name="NetworkName". This can’t be undone, so note the key first if you might need it. To reconnect later, pick the network from the Wi-Fi list and type its password. - Give other people who share the PC their own standard accounts. Anyone who can sign in as an administrator can read every saved Wi-Fi key.
Store the password you found somewhere protected, such as your browser’s password manager, not a text file.

Matt Jacobs writes and maintains the guides on Support Your Tech, which he started in 2017. He spent most of his career keeping small-business PCs running and still takes the occasional consulting job, so the steps here come from fixing the same problems on other people’s computers. Every guide is checked on his own Windows 11, Windows 10, Mac, iPhone and iPad before it goes up.