Profiles
Windowsâ
Dump profiles and PSKâ
tip
It does not need administrator privileges on W10. But the PSK can be protected in which case administrator privileges are required to get the clear text PSK.
Export all information in XML files in a folder
netsh wlan export profile folder=<C:\Windows\Temp> key=clear
Export ESSID and PSK in one file
netsh wlan show profiles|Select-String -Pattern " User Profile"|ForEach-Object{echo $_.Line.split(':')[1].trim()}|ForEach-Object{netsh wlan show profiles name=$_ key=clear}|Select-String -Pattern "Key Content|SSID name" >> <C:\Windows\Temp\psk.txt>
Print ESSID and PSK
netsh wlan show profiles | Select-String "\:(.+)$" | %{$name=$_.Matches.Groups[1].Value.Trim(); $_} | %{(netsh wlan show profile name="$name" key=clear)} | Select-String "Key Content\W+\:(.+)$" | %{$pass=$_.Matches.Groups[1].Value.Trim(); $_} | %{[PSCustomObject]@{ SID_NAME=$name;PASSWORD=$pass }} | Format-Table -AutoSize
Print ESSID and PSK - PS 2.0 version
netsh wlan show profiles | Select-String "\:(.+)$" | %{$name=$_.Matches | % {$_.Groups[1].Value.Trim()}; $_} |%{(netsh wlan show profile name="$name" key=clear)} | Select-String "Key Content\W+\:(.+)$" | %{$pass=$_.Matches | % {$_.Groups[1].Value.Trim()}; $_} | %{[PSCustomObject]@{ SID_NAME=$name;PASSWORD=$pass }} | Format-Table -AutoSize
Delete profilesâ
tip
You can just forget the network.
netsh wlan show profiles
netsh wlan delete profile name=*
Linux - Network-Managerâ
Dump profiles and PSKâ
List known ESSID
nmcli c
cat /etc/NetworkManager/system-connections/<ESSID>
Delete profilesâ
nmcli c delete uuid <uuid>
Macâ
security find-generic-password -ga <ESSID> | grep "password:"