Skip to content

Instantly share code, notes, and snippets.

@tascrafts
Created April 14, 2020 12:42
Show Gist options
  • Save tascrafts/04b2b7d3cea582fe903e490ce6fa56ac to your computer and use it in GitHub Desktop.
Save tascrafts/04b2b7d3cea582fe903e490ce6fa56ac to your computer and use it in GitHub Desktop.
Lists all saved wi-fi networks and passwords on Windows 10
(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
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment