Itâs a long story, but ⊠is there a way to get the Wi-Fi password for a network I was connected to at one time, but am not connected to right now?
Actually, yes there is.
Unless you explicitly tell it to forget, Windows will carefully remember all the passwords for all the wireless networks youâve connected to in the past.1
The only âtrickâ is that weâll be using Command Prompt to get Windows to show us that password.
Become a Patron of Ask Leo! and go ad-free!
Command Prompt (Admin)
Our work starts by running Command Prompt with Administrator privileges.
In Windows 10, that means right-clicking on the Start button and clicking on Command Prompt (Admin).
Netsh
The program weâll use is ânetshâ â short for Network Shell. Itâs a multi-purpose program that performs a number of network-related tasks.
Type the following command into Command Prompt (followed by Enter):
netsh wlan show profile
This lists all the wireless profiles Windows has remembered, with their network name, or SSID. Use that to identify which network youâre interested in.
For my example, Iâll use the network with the SSID âaskleo.com/hotspotâ2, but you would use the SSID for which you want to retrieve the password.
Type the following into Command Prompt:
netsh wlan show profile "askleo.com/hotspot" key=clear
This will display a lot of information about that specific wireless connection.
Underneath âSecurity settingsâ, listed as the âKey Contentâ, will be the Wi-Fi password youâre looking for.
Do this
Subscribe to Confident Computing! Less frustration and more confidence, solutions, answers, and tips in your inbox every week.
I'll see you there!
Cool. The command prompt type is small for these old eyes. Tried ctrl up arrow and control scroll with mousewheel. Is it adjustable?
Yes, but itâs not as simple as it is in a windows program. Youâd need to go into the command promptâs system menu (the menu at the top left icon), properties, and select a larger font.
Wow, I learned something thatâll reduce my eyestrain!
Thanks!
I was told that the âWireless Autoconfig Serviceâ (wlansvc) is not running. So, I didnât get the SSID display.
Same here, but I know why : Iâve explicitly disabled that service as my computer donât have any wireless capability, connect via ethernet cable only.
Services can have 3 states : Automatic, manual and disabled.
Automatic will start as Windows start.
Manual will start only if needed by some process.
Disabled will never start.
If the service is set to automatic but stopped, or manual, the command should start it, so, it must be set as disabled.
As the service is not running, it canât return any information, it also canât store any information. It also mean that you just canât connect wirelessly automatically. You need to enter the password each time you want to connect.
Failed to get screen shot, but there was no password / content on either my main network nor my extender. ??
In Windows 7 (well it works for meâŠ) even if youâre not connected to a particular network you can go to âManage wireless networksâ from Network and Sharing Center, right click properties on one of your saved networks and then click the Security tab. Tick the âShow charactersâ box and thereâs the password. You probably need to be in an admin account, or have run that application with admin privs turned on, but all of that seems a bit easier than the Command prompt stuff.
Maybe that method has been removed in Windows 8 and 10?
Graham
It is still in Windows 8 and 10 when you are connected to a wireless network, but I have not found it when not connected. Many ways to get there but I use: Windows key + X, Network Connections, Right-click your wireless connection, Status, Wireless Properties, Security tab, check the box âShow charactersâ.
Claude,
This works for only the one youâre connected to. Leoâs command prompt method will bring up a list of all you connected to before. I was just able to check my Work password although Iâm on my Home network at the moment.
Following the instructions using Windows 10 ends up showing a Security Key line, but no Key Content line immediately below it as appears in your explanation. I do have a wireless password, but evidently it does not appear as you have described.
Itâs funny. I one school where I teach, the students arenât given the password to the WiFi, the secretary logs in for them on their computers the first time and the passwords are saved. Moral dilemma: should I teach them this? ;-)
Yes, I already did.
I have tried this procedure and I am amazed because although I never took my laptop out of my house it has produced a list with passwords of pretty distant wireless networks, that I only have in my mobile and that I have never manually introduced in my laptop. Although my laptop has not listed all of the passports included in my mobile, am I to assume that my mobile is âleakingâ information to my laptop?
I have read all the above but found no help. I am trying to open up my wifi connection. I know the Hub , itâs BTHub3-M9G4 but I,m nt sure of the password. How canI get it
You have to have connected once in order to ârecoverâ the password â which is what this article is about.
Thereâs no way to know the password of a wireless hotspot â thatâs kinda the point of the security of it all. Youâll either need to contact whomever set it up, or configure the hotspot yourself with a password you select.
Thank you very much for this article! I learned something new and it helps when you forgot to keep a memo of your wifi password.
I was able to retrieve my password. Thanks.
Thanks for posting Leo, just what I was looking for :)
I once used the network but I got disconnected Now I donât know how to find a saved password in my laptop I tried command prompt with netsh wlan but it failed
Read the article you are commenting on. It has all your option.
Failed how? Did you run as administrator?
before all thatâŠi already clicked forget on the network name so when I follow your steps it doesnât show any password next to key contentâŠwhat can I do?
How can I recover my Wi-Fi password, if Iâm not connected to it and havenât at all (The pc Iâm on now is new).
I tried the tutorial that was used but it said â User Profiles â
If youâve never connected, there are a couple of possibilities.
1. Many routers have a connect button sometimes called the WPS button. Pressing that while trying to connect will get you into the network and save the password on your computer which can be recovered via the instructions in this article you are commenting on.
https://answers.microsoft.com/en-us/windows/forum/windows_7-hardware/you-can-also-connect-by-pushing-the-button-on-the/18f8ec92-a0b5-41d3-a374-757261451cad
2. I believe all routers have a reset button which resets the password to the default which is usually printed on the router. (Donât try this without the ownerâs permission.)
3. Ask the owner or someone who has connected to that network :-)
So, I tried this however the âKey Contentâ didnât come up. It just said âSecurity key : presentâ or whatever. Does this mean I am unable to access it? Am I doing something wrong?
If you followed the instructions then Iâm not sure whatâs up. Itâs possible your network is using a different kind of encryption key, I might guess.
My Windows was reinstalled so it does not remember my password :( Any other suggestion. I got home and I do remember my password and have it written but it does not work.
Only thing I can suggest is using a different device that can connect to the network. Otherwise youâll have to contact the Wi-Fi owner for the password, or reset the Wi-Fi password at the access point to something you know.
I just ran ânetsh wlan show profileâ in Power Shell and a lot of WiFi logins showed up for places that I never visited with this computer. I had visited with other computers. Is it possible that they were put there by LastPass which remembers WiFi passwords? I would have thought that LastPass would only place them in your saved networks after visiting that hotspot with that computer.
I believe either (or both?) your Google account and Microsoft account may sync Wi-Fi passwords.
I consider that a good thing, but itâs something that might freak conspiracy theorists out.
I found the password and put it in, but itâs still saying the network security key isnât correct.
Thank you! Worked on Windows 10. Needed to remember password to a network I wasnât connected to. Windows Help said it canât be done. Good thing I found Ask Leo!