WifiPasswordReveal: A script to reveal all the saved WiFi passwords in Windows 7 and above


The “How to show saved Windows 7 Wifi passwords” turned out to be a popular article and to make the life of my readers easier, I decided to apply a newly acquired knowledge and write a tool to make it SUPER EASY to get all the saved WiFi passwords without needing administrative privileges and without having to click through various settings dialogs.

Read on!

batchography-good-resIn the past few month, I have been busy writing my new book: “Batchography: The Art of Batch Files Programming” and along the way I learned various Batch files programming tricks!

To get the saved WiFi passwords, one can type two command lines and then scroll through the output to find the needed information. However, not all users are tech savvy and would be intimidated by the command prompt.

To save you from the trouble and relying on the knowledge from Chapters 2 and 3 in the Batchography book, I could easily write an elegant script that reveals all the saved passwords!

I would say that the Batchography book is really handy for solving day to day computer problems with little efforts.

I highly recommend getting this book because you can learn to write similar scripts and sharpen your technical skills.

By the way, you get the printed book from Amazon using this link here or the ebook using this link!

flower separator

If you don’t care about the details and the know-how, then skip to the end of the article to get the download information for the script!

How to do it manually from the command prompt

To get the saved WiFi passwords on the system, you have to issue two commands.

The first command is:

netsh wlan show profiles

It will output all the saved network profiles on the system, for example:

C:\Users\User>netsh wlan show profiles

Profiles on interface Wi-Fi:

Group policy profiles (read only)

User profiles
    All User Profile     : WifiNetwork1
    All User Profile     : WifiNetwork2
    All User Profile     : WifiNetwork3

Now that we have a bunch of network profile names, we will invoke a new command to get the key information about a saved profile:

C:\Users\user>netsh wlan show profile name="WifiNetwork1" key=clear

This command will output various information about the network but in particular the password, referred to as “Key Content”, if the WiFi network was password protected (as opposed to an open WiFi network):

Profile WifiNetwork1 on interface Wi-Fi:

Applied: All User Profile

Profile information
    Version                : 1
    Type                   : Wireless LAN
    Name                   : WifiNetwork1
    Control options        :
        Connection mode    : Connect manually
        Network broadcast  : Connect only if this network is broadcasting
        AutoSwitch         : Do not switch to other networks
        MAC Randomization  : Disabled

Connectivity settings
    Number of SSIDs        : 1
    SSID name              : "WifiNetwork1"
    Network type           : Infrastructure
    Radio type             : [ Any Radio Type ]
    Vendor extension          : Not present

Security settings
    Authentication         : WPA2-Personal
    Cipher                 : CCMP
    Authentication         : WPA2-Personal
    Cipher                 : Unknown
    Security key           : Present
    Key Content            : thepassword1

Cost settings
    Cost                   : Unrestricted
    Congested              : No
    Approaching Data Limit : No
    Over Data Limit        : No
    Roaming                : No
    Cost Source            : Default

The idea then is to repeat the previous command for each saved network profile to retrieve the password.

Using the WifiPasswordReveal script

It is very easy to use the WifiPasswordReveal script. Just download it:

Download WifiPasswordReveal

…and then run the Batch file that’s inside the zip archive you just downloaded.

Because you are trying to run an un-signed script from the Internet, you may get a prompt like this:


Just click “More info” and choose “Run anyway”.

Note: If you don’t trust my WifiPasswordReveal script and what it does, you can always read its source code from here or from inside the zip archive you just downloaded!

Here’s a sample output:


Pretty straight forward!

The beauty of this is that you are not downloading any executable files that you don’t know what they do and most importantly you don’t need administrative privileges.

flower separatorYou might also like:

10 thoughts on “WifiPasswordReveal: A script to reveal all the saved WiFi passwords in Windows 7 and above

  1. The batch file uses the ‘netsh wlan show profiles’ command. You cannot acquire the password in plain text if you are not running this script as admin. The batch file executes without admin access, but it cannot acquire the security key without admin access. So, this is useless if one is not signed in as admin.

    • Well, I tried it as non admin and so did my friends and it worked. I don’t know why it does not work with you.

    • It is hard to troubleshoot the script like this. If it does not work for you just follow the manual method as described in the blog post. First do “netsh wlan show profiles ” then pick a profie and call the other command “wlan show profile name=TheName key=clear” etc…Good luck!

Leave a Reply