1
0
mirror of https://github.com/jaapbrasser/SharedScripts.git synced 2025-12-24 21:51:38 +02:00

Fixed $CurrentWifi section

This commit is contained in:
Jaap Brasser
2017-10-03 15:08:12 +09:00
parent ad1e501c1c
commit 3b47c1fac3

View File

@@ -37,7 +37,7 @@ Retrieves all the passwords and profiles
if ($WifiProfile) {
foreach ($CurrentWifi in $WifiProfile) {
$Hash = [ordered]@{
WifiName = ($_ -split '\:',2)[1].Trim()
WifiName = $CurrentWifi
}
$Hash.Password = (-join ((netsh wlan show profile "$($Hash.WifiName)" key=clear) -match 'key c')) -replace '\s*Key Content\s+: '