HowSoftwareTech

How to find your Wi-Fi passwords on Windows 10

Wi-Fi is everywhere, and I’m sure you connect to a multitude of networks.

However, imagine that you no longer remember the Wi-Fi key entered in your computer.

How do you give it to your friend / colleague? Here is a great PowerShell script that will give you all the information!

Wi-Fi passwords on Windows 7

We have to admit it on Windows 7 it was quite simple, since when you click on “Manage Wireless Networks“you can in the properties of the network display the Wifi password in plain text.

view wireless networks

It’s more complicated on Windows 10 but here is a script that will make your life easier!

Powershell script to display Wi-Fi passwords

I admit the script is not from me but from DFSC.NET

The author has also put his script on PastBin.

In any case for having tested it works nickel it allows recover lost WiFi passwords.

The script works for Windows 10, Windows 8.1, and Windows 7.

  1. #Source: https://www.dsfc.net/infrastructure/reseau/recuperer-cles-securite-wifi-systeme-windows/

  2. #Visualization of blocked networks

  3. $ cmd0=netsh wlan show blockednetworks

  4. #List of SSIDs

  5. $ cmd1=netsh wlan show profiles

  6. ForEach($ row1 in $ cmd1)

  7. {

  8. # Retrieving ssids by regular expression

  9. If($ row1 -match ‘Profile All users[^:]+ :. (. +) $ ‘)

  10. {

  11. $ ssid=$ Matches[1]

  12. $ cmd2=netsh wlan show profiles $ ssid key=clear

  13. ForEach($ row2 in $ cmd2)

  14. {

  15. # Retrieving keys by regular expression

  16. If($ row2 -match ‘Contents of the c[^:]+ :. (. +) $ ‘)

  17. {

  18. $ key=$ Matches[1]

  19. #Storage of ssids and keys in an array

  20. $ wifi+ =[PSCustomObject]@{ssid=$ ssid; key=$ key}

  21. }

  22. }

  23. }

  24. }

  25. #Export the table to a csv file

  26. $ wifi|Export-CSV -Path ‘c: wifi.csv’ -NoTypeInformation

  27. #Visualization of the table

  28. $ wifi|Fate -Property ssid|OutGridView -Title ‘Station SSID keys’

You can save the contents of the script to a .ps1 file.

powershell script example

Once you run the script you will get a table with the name of the networks AND the password.

Run it as administrator so that it can create a Wifi.csv file in the C:

In short, thanks to the script you will also be able to display all Wi-Fi keys for all networks to which you connected

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button

Adblock Detected

Please consider supporting us by disabling your ad blocker