Skip to content

Instantly share code, notes, and snippets.

@willjobs
Created October 2, 2017 03:33
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 7 You must be signed in to fork a gist
  • Save willjobs/8d78fa8bb5de69b1143da6933761a71f to your computer and use it in GitHub Desktop.
Save willjobs/8d78fa8bb5de69b1143da6933761a71f 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
@willjobs
Copy link
Author

willjobs commented Oct 2, 2017

@alstergee
Copy link

running win10 19045.2364 and this takes but does absolutely nothing otherwise. any advice?
would also love to see an example of it outputting to a txt or csv file in a directory such as desktop

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