How to find your wifi passwords in PowerShell
Recently while working on migrating SSIDs from one manufacturers kit to another I found it necessary to check the PSK stored on Windows. The following PowerShell script is what I have been using to give me a concise list of the SSIDs and PSKs stored within Windows (Tested on Windows 10 and Windows 11).
1. Search for PowerShell in the start menu, right click on the entry and select run as administrator.
2. Enter the following commands and hit enter:
(netsh wlan show profiles) | Select-String "\:(.+)$" | %{$name=$_.Matches.Groups[1].Value.Trim(); $_} | %{(netsh wlan show profile name="$name" key=clear)} | Select-String "Key Content\W+\:(.+)$" | %{$pass=$_.Matches.Groups[1].Value.Trim(); $_} | %{[PSCustomObject]@{ PROFILE_NAME=$name;PASSWORD=$pass }} | Format-Table -Wrap
And thats it! it will output a nice list of the known Wi-Fi networks and their passwords.
Comments
Post a Comment