Skip to content

Instantly share code, notes, and snippets.

@JesperJ
Created October 4, 2022 11:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JesperJ/14eb52a40a9980cc065adb59242048a1 to your computer and use it in GitHub Desktop.
Save JesperJ/14eb52a40a9980cc065adb59242048a1 to your computer and use it in GitHub Desktop.
Get Windows 10 Wlan Password
function Get-Win10WlanPassword {
(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