Skip to content

Instantly share code, notes, and snippets.

@joegasper
Created September 23, 2016 02:18
Show Gist options
  • Save joegasper/1a99dd9e23f2cc5d9331c9dc350aacb0 to your computer and use it in GitHub Desktop.
Save joegasper/1a99dd9e23f2cc5d9331c9dc350aacb0 to your computer and use it in GitHub Desktop.
#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