Created
September 23, 2016 02:18
-
-
Save joegasper/1a99dd9e23f2cc5d9331c9dc350aacb0 to your computer and use it in GitHub Desktop.
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
#Wi-Fi Connection Information | |
$data = (netsh wlan show networks mode=Bssid | | |
where {$_ -like "SSID*" -or $_ -like "*Authentication*" -or $_ -like "*Encryption*" -or $_ -like "*Signal*"}).trim() | |
$result = for ( $i = 0; $i -lt $data.count; ) { | |
'' | Select @{n='Connection';e={($data[$i].split(':')[1]).trim()}}, | |
@{n='Authentication';e={($data[$i+1].split(':')[1]).trim()}}, | |
@{n='Encryption';e={($data[$i+2].split(':')[1]).trim()}}, | |
@{n='Signal';e={($data[$i+3].split(':')[1]).trim()}} | |
$i = $i + 4 | |
} | |
Return $result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment