From 3b47c1fac37a04fec7932c495e355d1d2eef864a Mon Sep 17 00:00:00 2001 From: Jaap Brasser Date: Tue, 3 Oct 2017 15:08:12 +0900 Subject: [PATCH] Fixed $CurrentWifi section --- Get-WifiProfile/Get-WifiProfile.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Get-WifiProfile/Get-WifiProfile.ps1 b/Get-WifiProfile/Get-WifiProfile.ps1 index 329c99d..d922c60 100644 --- a/Get-WifiProfile/Get-WifiProfile.ps1 +++ b/Get-WifiProfile/Get-WifiProfile.ps1 @@ -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+: '