Public/Functions/OSDCloud/Get-WiFiProfileKey.ps1
1 2 3 4 5 6 7 8 9 |
Function Get-WiFiProfileKey { param ( [String]$SSID ) $ProfileInfo = netsh wlan show profile name=$SSID key=clear $Key = ($ProfileInfo | Select-String "Key Content").ToString().Split(":") | Select-Object -Last 1 $Key = $Key.Trim() return $Key } |