Windows – Export / Recover WEP and WPA Wireless Keys

KB ID 0001015 


If you need to connect to your wireless network with a new machine and have forgotten the key, you can view the WEP or WPA key in cleartext using the following procedure on a machine that has connected before.


1. First launch PowerShell, ensure you ‘Run as administrator‘.

Powershell as Administrator

2. To show all the wireless profiles stored on this machine, issue the following command;

netsh wlan show profiles

Powershell reveal wireless key

3. From the output above, the wireless profile I want the key for, is called SMOGGYNINJA-N. Note: This is the same as the Wireless networks SSID. To view the wireless key in clear text use the following command;

netsh wlan show profiles name=”SMOGGYNINJA-N” key=clear

Powershell View Wireless Key

You can also export the profile from one PC to another one, (so you don’t have to enter the key on the new PC), with the following two commands.

To Export a Wireless Profile

md c:WiFi netsh wlan export profile “SMOGGYNINJA-N” folder=c:Wifi

Powershell Export Wireless Profile

To Import a Wireless Profile

Copy the WiFi folder you created in the step above, to the new PC/Laptop. Then execute the following command. Note: Change the section in red to match the path to your XML file.

netsh wlan add profile filename=”c:WiFiWi-Fi-SMOGGYNINJA-N.xml” user=current

Powershell Import Wireless Profile

Related Articles, References, Credits, or External Links

Hacking Wireless WEP Keys with BackTrack and Aircrack-ng

Author: Migrated

Share This Post On