Need your wifi info? There is a Powershell script for that.
I spent some time cleaning up my laptop the other day which included removing unused programs and files. It then hit me that I probably had a bunch of wifi profiles that I don't need anymore so I thought about writing a script to call the netsh command to output this info. After working on this for about an hour and finally having a crude Powershell command that did output me this info I did a search and sure enough someone else had already wrote on. Anyways, here is the command I came up with and a link to the script I found.
PS C:\Windows\system32> netsh wlan show profiles | Select-String -Pattern "All User Profile" | ForEach-Object {$_.ToString()} | ForEach-Object {$_.Replace(" All User Profile : ",$null)} | ForEach-Object {netsh wlan show profile name=$_ key=clear} | Format-List
Profile Wireless1 on interface Wi-Fi:
=======================================================================
Applied: All User Profile
Profile information
-------------------
Version : 1
Type : Wireless LAN
Name : Wireless1
Control options :
Connection mode : Connect automatically
Network broadcast : Connect only if this network is broadcasting
AutoSwitch : Do not switch to other networks
Connectivity settings
---------------------
Number of SSIDs : 1
SSID name : "Wireless1"
Network type : Infrastructure
Radio type : [ Any Radio Type ]
Vendor extension : Not present
Security settings
-----------------
Authentication : WPA2-Personal
Cipher : CCMP
Security key : Present
Key Content : a1b2c3d4e5f6
Cost settings
-------------
Cost : Unrestricted
Congested : No
Approaching Data Limit : No
Over Data Limit : No
Roaming : No
Cost Source : Default
Link to script: https://gallery.technet.microsoft.com/scriptcenter/652a0652-9f5e-4aed-9a4d-3b4e2cb56aa6
PS C:\Windows\system32> netsh wlan show profiles | Select-String -Pattern "All User Profile" | ForEach-Object {$_.ToString()} | ForEach-Object {$_.Replace(" All User Profile : ",$null)} | ForEach-Object {netsh wlan show profile name=$_ key=clear} | Format-List
Profile Wireless1 on interface Wi-Fi:
=======================================================================
Applied: All User Profile
Profile information
-------------------
Version : 1
Type : Wireless LAN
Name : Wireless1
Control options :
Connection mode : Connect automatically
Network broadcast : Connect only if this network is broadcasting
AutoSwitch : Do not switch to other networks
Connectivity settings
---------------------
Number of SSIDs : 1
SSID name : "Wireless1"
Network type : Infrastructure
Radio type : [ Any Radio Type ]
Vendor extension : Not present
Security settings
-----------------
Authentication : WPA2-Personal
Cipher : CCMP
Security key : Present
Key Content : a1b2c3d4e5f6
Cost settings
-------------
Cost : Unrestricted
Congested : No
Approaching Data Limit : No
Over Data Limit : No
Roaming : No
Cost Source : Default
Link to script: https://gallery.technet.microsoft.com/scriptcenter/652a0652-9f5e-4aed-9a4d-3b4e2cb56aa6
Comments
Post a Comment