Skip to content

Instantly share code, notes, and snippets.

@CybersamuraiDK
Forked from willjobs/wifi-passwords.ps1
Created October 3, 2020 17:18
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save CybersamuraiDK/6e0be5c0c47165228895079efa8d98ec to your computer and use it in GitHub Desktop.
Save CybersamuraiDK/6e0be5c0c47165228895079efa8d98ec 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
@dnsati
Copy link

dnsati commented Jul 21, 2023

Thanks for the one liner. Does wotk on W10.

@ps81frt
Copy link

ps81frt commented Feb 16, 2024

no work W11

@Mrcodermann
Copy link

it works on my W11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment