Skip to content

Instantly share code, notes, and snippets.

@devna13
Forked from willjobs/wifi-passwords.ps1
Created November 16, 2022 15:47
Show Gist options
  • Save devna13/d2bfb5f513c83d4dfe3ac316bd21c0d5 to your computer and use it in GitHub Desktop.
Save devna13/d2bfb5f513c83d4dfe3ac316bd21c0d5 to your computer and use it in GitHub Desktop.
PowerShell script to show all wifi passwords saved in Windows
(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 -AutoSize
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment