(Guide) How to view Windows 8.1/Windows 10 saved Wi-Fi passwords

Have a Windows 8.1/Windows 10 PC, and want to find out a Wi-Fi password to share with someone? Oh boy, do I have an easy way to do that!

Step 1: Download Wifi_Password_Viewer (direct download link; this GitHub post is not associated with me)
Step 2: Unzip the file (which is probably located in your “Downloads” folder)
Step 3: Inside of the “WiFi_Password_Viewer-master” folder, create a .ps1 file called “Wifi Password Viewer.ps1”
Step 4: Right-click the “Wifi Password Viewer.ps1” file, and open it with notepad or whatever word processor of your choosing
Step 5: Insert these two basics lines into the file:

if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs; exit }
python C:\Users\%username%\Downloads\WiFi_Password_Viewer-master\user_interface.py
  • The first long line of the script opens a Powershell window as an administrator.
  • The second short line of the script runs the Github python script as an administrator.
  • *Ensure the second line of the script points to where YOUR “WiFi_Password_Viewer-master\user_interface.py” file is located

Step 6: Save the file
Step 7: Right-click the script (Wifi Password Viewer.ps1), select “Properties”
Step 8: Under the “General” tab, MAKE SURE the “Type of file:” is a PS1 File (.ps1). If not, at the top of the “General” tab, ensure “Wifi Password Viewer” ends in .ps1, AND NOT .ps1.txt
Step 9: Still under the “General” tab, change the “Opens with:” from Notepad (or whatever the default is for you) to Windows Powershell. To do this, select “Change…” --> “More apps” --> Scroll to the bottom and select “Look for another app on this PC” and navigate to where your powershell.exe is located (in my case and for many others, it is located at “C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe”)
Step 10: Select “Apply”, and you can now close the “Properties” window.

Now if you double-click the “Wifi Password Viewer” file, it will prompt for an administrator password (depending on your user accounts security level), and after typing that in, all of your laptops saved Wi-Fi network usernames, passwords, authentication and encryption type will be shown.


Here are some optional steps to follow so that, instead of navigating to where the “Wifi Password Viewer” script is located, you can just search it

Step 11: Right-click the “Wifi Password Viewer.ps1” file, and instead of clicking “Properties,” this time select “Create shortcut”
Step 12: Open another File Explorer window, and navigate to “C:\ProgramData\Microsoft\Windows\Start Menu\Programs”, and drag-and-drop the shortcut file you just created into “Start Menu\Programs” folder


And now you’re done! This may seem like a lot of steps, but it’s only that way so that I could be as laymans as possible! If you have any corrections or suggestions for my instruction guide, leave a comment and let me know! If you want to make a quick one-minute video of this instruction guide, go right ahead, and I’ll edit my post to include your video.

Hope you found this useful!

3 Likes

And you can’t just …
https://support.microsoft.com/en-us/help/4023501/windows-find-wireless-network-password

?

1 Like

Alternatively

netsh.exe wlan show profiles name="<profile name>" key=clear

You can see a more specific powershell method here

No need anymore for other scripting languages

1 Like

This requires you to be connected to the network

This method requires you to know the network names exact spelling.

While both of you provide somewhat useful solutions, they don’t always work.

If i’m not on the network (ex. at work), or don’t remember the exact spelling of the network (complicated name, or rarely type in) I’m trying to get the password for, I can’t get the password for the network. With my solution, I can know the network username + password whenever. It’s a bit annoying to setup the first time, but I’ve personally used it a few when I’m away from home and my parents need the network password.

I just make an entry in my password manager for such things…

I wish I was smart like you guys

netsh.exe wlan show profiles

If you look at the link i provided you can do what you want in powershell

For example

$wi = netsh.exe wlan show profiles
$list = $wi | ForEach-Object { if ($_ -match "\s*All User Profile\s*:\s*(.*)") {$($matches[1])}}
$WifiList = @()

foreach ( $i in $list) {
    $WifiItem = New-Object System.Object

    $profile = netsh wlan show profile name="$i" key=clear
    $ssid = $profile | Select-String -Pattern "SSID Name"
    $ssid = ($ssid -split ":")[-1].Trim() -replace '"'

    $pass = $profile | Select-String -Pattern "Key Content"
    $pass = ($pass -split ":")[-1].Trim() -replace '"'

    $WifiItem | Add-Member -MemberType NoteProperty -Name "SSID" -Value $ssid
    $WifiItem | Add-Member -MemberType NoteProperty -Name "Key" -Value $pass
    $WifiList += $WifiItem
}
$WifiList

Example output

SSID              Key      
----              ---      
XYZ               shcnd7493jd
FRITZ!Box 7530 GQ anu93£ss3d3u2

No need for third party software or three year old psexec binaries :neutral_face:

You can also make a gui if you want

1 Like

Isn´t that the case with either methods mentioned in this topic?
Kinda interesting.

No. The powershell method above doesn’t require you to be connected to the network to get the password. It can display all stored WiFi password on the computer it’s run on.