How to view your WiFi password using CMD: full instructions

It's quite common to need to connect a new device to a home or office network but have forgotten or lost the password. Users often look for ways to restore access to data using standard operating system tools, without resorting to complex third-party software. Windows provides built-in tools for managing network connections that are hidden from the average user but accessible when needed.

One of the most effective methods is the use of command line (CMD). This system component not only allows you to diagnose connection problems but also retrieve saved security keys. Understanding how network profiles work in Windows opens up access to management. WLAN connections at a deeper level.

In this guide, we'll walk you through a step-by-step procedure for recovering forgotten login credentials. You'll learn which commands to enter, how to interpret the results, and what to do if the system refuses to provide information. This knowledge is essential for any administrator or advanced PC user.

How Windows Network Profiles Work

The Windows operating system stores information about all the networks the computer has ever connected to. For each such connection, a special network profileThis profile contains not only the network name (SSID), but also the encryption type and the security key required for automatic authorization upon reconnection.

These profiles are protected by system access rights. A standard user can see their list in the graphical interface, but does not have direct access to the text content of the passwords. This is done for security purposes. securityto prevent malware or inexperienced users from easily stealing or changing network settings.

However, if you have administrator rights, you can use system utilities to manage these profiles. Utility netsh Network Shell is a powerful network configuration tool. It allows you to interact with the Windows network stack, including wireless adapters. We'll use it to request hidden data.

⚠️ Note: All password extraction steps are only possible if your computer has previously connected to this network and saved the profile. This method is not suitable for finding the password for a network you've never connected to.

It's important to understand that keys are stored encrypted, but the system can decode them for internal use. The command line simply forces the system to "speak" this key in a human-readable format. This is a standard OS feature, not a hack.

Preparing the command line for work

Before entering commands, you must run the console with the correct privileges. A normal user may not have sufficient privileges to view security keys, especially on corporate networks or systems with enhanced security settings. administrator mandatory.

There are several ways to open the tool you need. The fastest is to use the Start menu search. Type "cmd" or "Command Prompt," then select "Run as administrator" from the search results. Alternatively, you can use a keyboard shortcut. Win + X and select "Windows PowerShell (Admin)" or "Terminal (Admin)", as they are fully compatible with CMD commands.

After launching a window with a black background, you'll see a blinking cursor. The standard copy keys, Ctrl+C and Ctrl+V, don't work here (although they may work in newer versions of Windows 10 and 11). Right-clicking or the keyboard shortcut are often used to paste text. Ctrl + V (if enabled) and Shift + Insert.

☑️ Check before you start

Completed: 0 / 4

Make sure the window title says "Administrator: Command Prompt." If this isn't the case, restart the program; otherwise, the commands may return an access error. Also, make sure your Wi-Fi adapter is enabled and working properly, although an active connection isn't always necessary to view saved profiles.

Viewing a list of saved networks

Before searching for a specific password, you need to know the exact name of the profile saved in the system. Sometimes network names can differ from the actual SSID, especially if you've connected to networks with the same name in different locations (for example, "Home" and "Home 2").

To display a list of all profiles known to the computer, use the command:

netsh wlan show profiles

In response to this request, the system will return a long list. We're interested in the "User Profiles" section. All names will be listed there. Remember or write down the exact name of the desired network, as you'll need it in the next step. Letter case is usually unimportant, but spaces and special characters should be taken into account.

If the list is empty, this means no Wi-Fi profiles have been previously saved on this computer. In this case, you won't be able to recover the password from this PC, and you'll have to find another device that has previously connected to the router.

📊 What operating system do you use?
Windows 10
Windows 11
Windows 7
Windows 8/8.1
Other

Sometimes you'll see technical names of profiles created by virtual machines or emulation programs in the list. Be careful and select the name of your home or work network. If you see many similar names, select the one most recently used.

Obtaining the password for a specific network

Once the profile name is known, you can request the security key to be displayed. This is done using an extended version of the command, specifying the profile name and the key disclosure parameter. The syntax requires the exact name.

Enter the following command, replacing Network_Name to your value:

netsh wlan show profile name="Network_Name" key=clear

Please note the quotation marks. If the network name contains spaces (e.g., "My Home WiFi"), the quotation marks are required. If there are no spaces, you can omit the quotation marks, but their presence will never cause an error. Parameter key=clear This is precisely what tells the system that the key needs to be shown in clear text.

Running the command will open a detailed window with profile information. We're interested in the "Security settings" section. Inside this section, find the "Key Content" line. The value next to this line is your password.

⚠️ Warning: If you see an error message or an empty value instead of a password, the profile may have been created with permissions only for the current user, and you launched the console with different permissions, or the profile may be corrupted.

This command displays a lot of unnecessary information, such as the encryption type (WPA2-Personal), radio type (802.11n/ac), and connection status. Don't be intimidated by the volume of text; simply scroll up or down to find the section you need. All the information is structured, and with careful searching, you'll quickly find the line containing the key.

Analysis of security and encryption parameters

When viewing your profile via CMD, you may notice various encryption settings. Understanding these abbreviations is helpful for assessing your network's overall security. Modern standards provide robust protection, while older ones may be vulnerable.

The table below shows the main encryption types you might see in the command report. netsh:

Encryption type Description Security level
WPA2-Personal The most common standard using AES High
WPA3-Personal The latest standard with enhanced password protection Very tall
WPA-Personal Outdated standard, may be vulnerable Average
WEP Very old and insecure protocol Short
Open No encryption, no password required Absent

If the "Encryption Type" field is set to WEP or Open, it is strongly recommended to change your router settings. It is impossible to transmit the password on open networks because it simply doesn't exist. In the case of WEP, the password can be recovered, but the network itself requires an immediate upgrade to WPA2/WPA3.

Why is WEP considered insecure?

The WEP protocol uses static encryption keys, which can be easily intercepted by specialized software in a matter of minutes. Modern WPA2 and WPA3 standards use dynamic keys and more complex AES encryption algorithms, making data interception virtually impossible for the average attacker.

The report also displays information about the authentication type. For home networks, this is common. WPA2-PersonalIf you see WPA2-EnterpriseThis means that connecting requires not just a password, but a login and password (often used in universities and large offices). In this case, viewing the "password" via CMD is not possible, as a more complex server-based authentication scheme is used.

Deleting profiles and resetting settings

Sometimes you need to delete a saved profile rather than view it. This might be necessary if you've changed your router password and your computer tries to connect with the old password and returns an error, or if you need to clear the connection history on a public computer.

To delete a specific profile, use the command:

netsh wlan delete profile name="Network_Name"

After executing this command, the profile will disappear from the list. The computer will "forget" the network and password. The next time you try to connect, the system will prompt you to enter the security key again. This is a useful feature for resetting incorrect settings.

You can also delete all profiles at once, although this is rarely done, as you'll have to re-enter passwords on all devices. This drastic measure is sometimes used when completely reconfiguring a network or before selling a computer. Be careful when using bulk deletion to avoid losing access to important networks.

Common mistakes and how to solve them

When working with the command line, users often encounter common errors. The most common is "The wireless network profile is not found." This means you entered the profile name incorrectly, didn't take into account capitalization or spaces, or the profile actually doesn't exist in memory.

Another common issue is lack of access rights. If the system reports "Access Denied," check if the console is running as an administrator. Without these rights, the command key=clear will not work, and there will be dashes in the key field.

Sometimes users confuse commands for different versions of Windows. Although the syntax netsh wlan The command is the same for Windows 7, 8, 10, and 11. On older systems (XP, Vista), the commands may differ or be absent. This is rare in today's environment, but it's worth keeping in mind.

If you use third-party WiFi management programs, they may store profiles in their own format, ignoring the Windows system format. In this case, netsh You may not be able to see these profiles. In this case, you'll need to look for the password in the manager program's settings.

FAQ: Frequently Asked Questions

Is it possible to find out a neighbor's WiFi password using CMD?

No, that's not possible. The command line only allows profiles that are already saved on yours computer. If you've never connected to your neighbor's network or entered a password, it won't be in your system's memory, and CMD won't be able to magically create or crack it.

What should I do if the "Key Content" field is empty?

This means you don't have administrator rights. Restart the command prompt by right-clicking the CMD shortcut and selecting "Run as administrator." Only then will the command with the parameter key=clear will show the password.

Does this method work on Windows 11?

Yes, the method is fully relevant for Windows 11, 10, 8 and 7. The command netsh is system-wide and hasn't changed in recent OS versions. The interface may look slightly different, but the command syntax remains the same.

How to copy a password from a black CMD window?

In modern versions of Windows, you can simply select the text with your mouse and click Ctrl+CIn older versions, you need to right-click on the window title, select "Edit" -> "Select," select the text, click "Edit" -> "Copy," or simply right-click after selecting.

Is it possible to recover the password if I reset the router?

No. Resetting the router deletes all settings, including the WiFi password, returning them to factory defaults. You can't view the old password using CMD, as it's no longer valid. You'll need to use the password printed on the sticker on the bottom of the router or set up a new network from scratch.