Display WiFi network password via netsh wlan command

July 20, 2023 0 Door Bjorn Meijer

Windows stores your wireless network profiles. The login details of the WiFi network are then also saved. This is useful if you can't remember the password of one of these WiFi networks.

What is netsh

Netsh stands for Network Shell and is a command-line tool available in Windows operating systems. netsh enables network administrators and system administrators to perform a wide variety of network-related tasks, ranging from setting up IP addresses and DNS settings to troubleshooting network problems. But in our case, we are going to use it for finding out the password of the WiFi network.

View WiFi network profiles

To view the password of one of the saved WiFi networks, open the DOS prompt or Powershell on your computer.

With the command netsh wlan show profiles all wireless network profiles are displayed.

netsh wlan show profiles Profiles on interface Wi-Fi: Group policy profiles (read only) -------------------------------- - User profiles ------------- All User Profile : devolo-545 All User Profile : TP-Link_5870 All User Profile : Ziggo6963555 All User Profile : E5785-MIFI-4674 All User Profile : The Office Operators All User Profile : WIFIonICE All User Profile : TP-Link_ACEE All User Profile : Ziggo0923247 All User Profile : UvA Open Wi-Fi All User Profile : LAPTOP_RVS 5821

A number of network profiles are shown above. We can see the network settings of the network profile devolo-545 using the command netsh wlan show profile name=devolo-545. The result is as follows:

netsh wlan show profile name=devolo-545 Profile devolo-545 on interface Wi-Fi: ============================== ======================================= Applied: All User Profile Profile information --- ---------------- Version : 1 Type : Wireless LAN Name : devolo-545 Control options : Connection mode : Connect automatically Network broadcast : Connect only if this network is broadcasting AutoSwitch : Do not switch to other networks MAC Randomization : Disabled Connectivity settings --------------------- Number of SSIDs : 1 SSID name : "devolo-545" Network type : Infrastructure Radio type : [ Any Radio Type ] Vendor extension : Not present Security settings ----------------- Authentication : WPA2-Personal Cipher : CCMP Authentication : WPA2-Personal Cipher : GCMP Security key : Present Cost settings ------------- Cost : Unrestricted Congested : No Approaching Data Limit : No Over Data Limit : No Roaming : No Cost Source : Default

Show WiFi password

Under Security Settings you can also display the password of the network profile. For this we need to add an extra parameter to the command. Namely key=clear.

netsh wlan show profile name=devolo-545 key=clear Profile devolo-545 on interface Wi-Fi: =========================== ========================================== Applied: All User Profile Profile information ------------------- Version : 1 Type : Wireless LAN Name : devolo-545 Control options : Connection mode : Connect automatically Network broadcast : Connect only if this network is broadcasting AutoSwitch : Do not switch to other networks MAC Randomization : Disabled Connectivity settings --------------------- Number of SSIDs : 1 SSID name : "devolo-545" Network type : Infrastructure Radio type : [ Any Radio Type ] Vendor extension : Not present Security settings ----------------- Authentication : WPA2-Personal Cipher : CCMP Authentication : WPA2-Personal Cipher : GCMP Security key : Present Key Content : Test123456789 Cost settings ------------- Cost : Unrestricted Congested : No Approaching Data Limit : No Over Data Limit : No Roaming : No Cost Source : Default

As you can see above, the Key Content line has been added under Security settings with the password Test123456789 displayed.