How to find your WiFi password using the Windows 10 command line

It's common to need to connect a new device to your home network or grant access to guests, but the password is hopelessly forgotten. Fortunately, the operating system Windows 10 Stores data about previously connected wireless networks in a secure registry, allowing you to retrieve this information without having to access the router's settings or reset it to factory defaults. This is especially important if you don't have physical access to the router's admin panel or if the sticker containing the data has been lost.

Usage Command Prompt The command line is the most reliable and fastest way to accomplish this task, without requiring third-party software. Unlike the graphical interface, which requires navigating through several menu levels, console commands provide direct access to wireless network profiles. Below, we'll detail the process of restoring access, potential errors, and the nuances of working with network profiles in Windows.

Preparing the console and running it with administrator rights

The first step to performing any operations related to the system's network settings is to launch the command line interface with elevated privileges. Without rights administrator The system won't allow you to view saved security keys, as this is considered confidential information. Simply launching the app through the search bar may not provide the necessary level of access to system configuration files.

To do this, press the key combination Win + X and select "Windows PowerShell (Admin)" or "Command Prompt (Admin)" from the menu that appears. In newer versions of Windows 10, PowerShell often replaces the classic CMD, but the syntax for networking commands is identical. If you prefer the classic view, simply enter cmd In the search, right-click on the result and select "Run as administrator".

Once the window opens, make sure the title contains the path C:\Windows\system32\cmd.exe and administrator rights are confirmed. The environment is now ready for use.

View a list of saved WiFi profiles

Before extracting a specific password, you need to know the exact name of the network profile stored in the system. Users often confuse the SSID (the visible network name) with the technical name of the profile, especially if there are many similar entries or guest networks in the list. The command to display a list of all profiles ever connected to this computer is as follows:

netsh wlan show profiles

After entering the password and pressing Enter, the system will display a list of all user profiles. The section you're interested in is "User Profiles," where the name of each network will be listed. Remember or copy the exact name of the network you need, as you'll need it in the next step. If the network was connected a long time ago and the profile was manually deleted or cleared by the system, it won't be in this list.

In some cases, especially after major Windows updates, profiles may be sorted into groups or have suffixes. Carefully review the command output. If the desired network isn't listed, Windows doesn't store data for it, and you'll have to find the password through other means, such as the router's web interface.

📊 What version of Windows do you have?
Windows 10 Home
Windows 10 Pro
Windows 11
Windows 8.1 or later

Obtaining the password for a specific network

Once the profile name has been identified, you can request the security key to be displayed. This is done using the extended command with the parameter key=clear, which tells the system not to mask password characters. The command syntax requires the profile name to be specified in quotation marks if it contains spaces.

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

In the report that opens, find the "Security settings" section. We're interested in the "Key Content" line. The value next to this parameter is the password we're looking for. Copy it carefully, observing case sensitivity, as WiFi is case-sensitive.

If instead of a password you see a message stating that the key is not visible, this may mean the profile is corrupted or the group's security policy prevents keys from being displayed. Corporate networks often use certificates instead of passwords, and in this case, the method key=clear it won't work because the protocol is used WPA2-Enterprise.

☑️ Check before entering a command

Completed: 0 / 4

Analysis of security parameters and encryption type

The same profile information window where we found the password contains important technical information about the encryption and authentication type. Understanding these parameters is useful for diagnosing connection issues with new devices that may not support older security standards. The data is displayed in the "Security Settings" section.

Parameter Description Recommended value
Encryption type Data encoding algorithm AES (CCMP)
Security type Authentication protocol WPA2-Personal
Key content The network password itself (Hidden by asterisks)
Security key type Key format ASCII

Please pay attention to the encryption type. If specified TKIP or WEP, this indicates an outdated router configuration, which may be vulnerable to hacking and limit connection speed on modern devices. In this case, after gaining access to the router, it is recommended to change the encryption type to AES.

Why is it important to know the encryption type?

Some modern IoT devices, such as new models of smart lights or cameras, may simply refuse to connect to networks with TKIP or WPA encryption, requiring more modern security standards.

Deleting and managing network profiles

The command line allows you to not only view but also manage profiles. Over time, the list of saved networks can grow, including old, unnecessary entries that may interfere with automatic connections. Deleting a profile is done with the command delete profileThis action is irreversible without knowing the password.

netsh wlan delete profile name="Network_Name"

This feature is useful if you've changed your router password, but Windows continues to try to connect with the old password, returning an error. By deleting the profile, you'll force the system to request a new password the next time you try to connect. You can also delete all profiles at once, which is useful when reselling a computer or performing a deep system cleanup.

⚠️ Important: Before deleting a profile, make sure you know the current password or have physical access to the router to reset it. After executing the command delete profile It will be impossible to recover the password from the system, as the data will be destroyed.

Common mistakes and how to solve them

When working with console commands, users often encounter error messages. The most common ones are "Group Policy prohibits..." or lack of access rights. This can be resolved by restarting the console as an administrator. Another common error is "Profile not found," which occurs when the network name is entered incorrectly (case-sensitive and space-sensitive).

Another possible problem is the service WLAN AutoConfig may be stopped. If the commands fail or return empty results, check the status of this service via services.mscIt must be running and set to "Automatic" startup type. Without this service, managing WiFi via the command line is impossible.

If the system reports that the wireless network interface is not found, your WiFi adapter may be disabled or the drivers are missing. In this case, you must first repair the hardware using Device Manager. Commands netsh work only with active and working network interfaces.

What should I do if the network name contains special characters?

If the network name contains quotation marks or other special characters, try using single quotation marks or escaping the character with a backslash, although in Windows 10, double quotation marks around the entire name are usually sufficient.

FAQ: Frequently Asked Questions

Is it possible to find out the password for a network I've never connected to?

No, the Windows command line can only retrieve passwords for networks to which the computer has previously connected and saved a profile. It's impossible to hack someone else's network using these methods.

Does this method work on Windows 7 or 8?

Yes, teams netsh wlan work on all versions of Windows since Vista, including Windows 7, 8, 8.1, 10 and 11. The syntax remains unchanged.

What should I do if the output does not contain the "Key Contents" line?

This means that a corporate authentication method (such as a certificate or 802.1x login/password) is used for this network, and a single static WPA2 key is not stored in the profile.

Will the router password be reset after viewing?

No, team show profile It only reads information. It doesn't change your router settings or require a reboot. Your password remains the same.