Files
tacticalrmm/scripts_wip/Win_Wifi_SSID_and_Password_Retrievalv2.ps1
silversword411 4e5676e80f adding the wip
2021-04-29 11:45:32 -04:00

1 line
329 B
PowerShell

(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