Created
January 5, 2024 15:54
-
-
Save eizedev/dd518e435a1bfb03ecf7e40727568272 to your computer and use it in GitHub Desktop.
quick'n'dirty powershell "script" to get wifi credentials of known and stored wifi profiles.German version: `Get-WifiPassword-DE.ps1`, English version `Get-WifiPassword-EN.ps1`
This file contains 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
$WifiCred = @() | |
$listProfiles = netsh wlan show profiles | Select-String -Pattern "Profil für alle Benutzer" | ForEach-Object { ($_ -split ":")[-1].Trim() }; | |
$listProfiles | ForEach-Object { | |
$profileInfo = netsh wlan show profiles name=$_ key="clear"; | |
$Key = $profileInfo | Select-String -Pattern "Schlüsselinhalt" | ForEach-Object { ($_ -split ":")[-1].Trim() }; | |
$WifiCred += New-Object -TypeName psobject -Property @{SSID = $_; Password = $Key } | |
} | |
Write-Output $WifiCred |
This file contains 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
$WifiCred = @() | |
$listProfiles = netsh wlan show profiles | Select-String -Pattern "All User Profile" | ForEach-Object { ($_ -split ":")[-1].Trim() }; | |
$listProfiles | ForEach-Object { | |
$profileInfo = netsh wlan show profiles name=$_ key="clear"; | |
$Key = $profileInfo | Select-String -Pattern "Key Content" | ForEach-Object { ($_ -split ":")[-1].Trim() }; | |
$WifiCred += New-Object -TypeName psobject -Property @{SSID = $_; Password = $Key } | |
} | |
Write-Output $WifiCred |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment