Created
January 28, 2023 01:53
-
-
Save sweetim/e70351e99040432b1238e5e44361d6a7 to your computer and use it in GitHub Desktop.
get known wifi password in windows 11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(netsh wlan show profiles) ` | |
| Select-String "\:(.+)$" ` | |
| %{$network=$_.Matches.Groups[1].Value.Trim(); $_} ` | |
| %{(netsh wlan show profile name="$network" key=clear)} ` | |
| Select-String "Key Content\W+\:(.+)$" ` | |
| %{$password=$_.Matches.Groups[1].Value.Trim(); $_} ` | |
| %{[PSCustomObject]@{ NETWORK_NAME=$network;PASSWORD=$password }} ` | |
| Format-Table -AutoSize |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment