It's quite common to need to connect a new device to a wireless network but have lost or forgotten the password. In the operating system Windows 10 This problem is solved quite easily if you already have a computer that has successfully connected to this router before. Instead of searching for a sticker on the back of the router or resetting its settings, you can retrieve the saved security key directly from the system.
There are several methods for obtaining this information: through the graphical settings interface, with third-party programs, or using built-in command line tools. The latter option is considered the most reliable and professional, as it doesn't require installing additional software and works even if the graphical shell crashes.
In this article, we'll take a detailed look at how to find out your WiFi password on Windows 10 via CMD, using the built-in utility. netshYou'll learn not only how to view saved keys but also how to manage network lists, a useful skill for any system administrator or advanced user.
⚠️ Warning: Running commands related to viewing network profiles may require administrator privileges. Make sure you run the command prompt as an administrator, otherwise the system may deny access to information.
Preparing the command line for work
The first step is to launch the command line tool. There are several ways to do this in Windows 10, but accessing network settings requires elevated privileges. If you simply open cmd Through the Start menu, you will not be able to run queries against the WLAN database.
Right-click the "Start" button in the lower-left corner of the screen. In the context menu that appears, select "Windows PowerShell" or "Command Prompt (Administrator)". If you use the system search, type cmd, then right-click on the found result and select "Run as administrator".
After launching a window with a black background, you'll see a blinking cursor. This means the system is ready to accept commands. The command prompt interface in Windows 10 has become more flexible, allowing you to copy and paste text, but be careful when entering syntax.
- ✅ Click
Win + Xfor quick access to the administrator menu. - ✅ Use phrase search
cmdfor quick launch. - ✅ Make sure the window title says "Administrator: Command Prompt".
View a list of saved WiFi networks
Before searching for a specific password, you need to know the exact name of the network profile saved in the system. Often, the profile name is the same as the SSID (the visible name of the network), but in corporate environments or when configured manually, they may differ.
To get a list of all networks your computer has ever connected to, enter the following command:
netsh wlan show profiles
The system will display a report titled "User Profiles." The "Profile Names" column will list all available entries. Find your network name in this list. If you've forgotten the profile name but know it's your home network, look for familiar names, such as Keenetic, TP-Link or Beeline.
It's important to understand that this command only displays profiles stored in the current user account or globally in the system. If you connected to the network in guest mode without saving the password, it won't be listed.
Obtaining a specific network password via CMD
Once you've decided on a profile name, you can proceed to extracting the security key. For this, use a more detailed command with the parameter key=clearThis parameter tells the system to display the password in clear text, instead of asterisks.
The command syntax is as follows:
netsh wlan show profile name="NETWORK_NAME" key=clear
Replace NETWORK_NAME with the exact name of your profile from the previous step. If the name contains spaces, be sure to enclose it in quotation marks. For example, for the "Home WiFi" network, the command would be: netsh wlan show profile name="Home WiFi" key=clear.
In the command output, scroll down to the "Security settings" section. We're interested in the "Key Content" line. The value next to this field is your WiFi password.
- 🔑 The command is case-sensitive if the profile name contains special characters.
- 🔑 If your password isn't displayed, make sure you entered your profile name without any extra spaces.
- 🔑 To quickly copy the network name, use the command with output redirection to a file.
Analysis of security and encryption parameters
Team show profile Provides not only the password but also a wealth of technical information about the connection. This is useful for diagnosing connection or speed issues. In the "Security Settings" section, you'll find information about the encryption type.
Please note the line "Encryption" (Cipher). In modern networks, the standard is AES (Advanced Encryption Standard). If you see the value TKIP or WEP, this is a signal that your network is using outdated and insecure protocols that are easy to hack.
| Parameter | Description | Recommended value |
|---|---|---|
| Authentication | Authentication method | WPA2-Personal / WPA3 |
| Cipher | Data encryption algorithm | AES |
| Security key | Availability of an access key | Present |
| Connection mode | Connection mode | Manual / Auto |
You can also see the authorization type here. For home networks, the following standards are relevant: WPA2-Personal and new WPA3. If the "Security Type" field is set to Open, this means that your network is not password protected and anyone can connect to your internet.
⚠️ Note: If you see that your network is using WEP or TKIP encryption, we strongly recommend accessing your router settings and changing the security type to WPA2-PSK (AES). This will protect your data from interception.
Alternative Method: Using PowerShell
While CMD remains the classic tool, PowerShell is a more powerful tool in Windows 10 and 11. It not only allows you to manage profiles, but also displays passwords for all networks at once in a convenient format, saving time when managing large numbers of profiles.
To get a list of all profiles and their passwords in one line, use the following script. Copy it and paste it into the PowerShell window:
(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]@{ PROFILE_NAME=$name;PASSWORD=$pass } } | Format-Table -AutoSize
This code may seem complicated, but it simply automates a process we'd previously performed manually: finding profile names, iterating through them, requesting a key, and generating a table. The result will be a neat table listing all known networks and their passwords.
What should I do if PowerShell gives me a script execution error?
If you see a red error about the execution policy when running the script, enter the command: Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser . This will allow local scripts to run.
Using PowerShell is especially convenient when you need to quickly transfer data or save it to a log. However, for a one-time view of a single network password, the CMD method netsh remains simpler and more understandable for beginners.
Deleting and managing network profiles
Knowledge of commands netsh This is useful not only for viewing but also for cleaning up the list of networks. Over time, Windows accumulates public Wi-Fi profiles (cafes, airports, offices), which can create conflicts or simply take up space.
To delete a specific network profile, use the command:
netsh wlan delete profile name="NETWORK_NAME"
If you want to delete all saved profiles at once (for example, before selling your computer or completely resetting your network settings), you can use a command with a wildcard character:
netsh wlan delete profile name=* i
After running this command, the computer will "forget" all networks. When you try to connect to a known network, Windows will prompt you for the password again. This is an effective way to reset network settings without reinstalling the system.
- 🗑️ Deleting a profile does not delete the WiFi adapter drivers.
- 🗑️ After deleting a profile, the IP and DNS settings for that network will also be reset.
- 🗑️ Please be careful when deleting corporate network profiles, as their settings can be complex.
☑️ Check before deleting your profile
Frequently Asked Questions (FAQ)
Is it possible to find out a WiFi password if the computer has never connected to it?
No, it's impossible to find the password for a network the device has never connected to using CMD or Windows settings. The computer doesn't store encryption keys for other networks. This would require brute-force tools, which are illegal to use on other networks.
Why does the netsh wlan show profile command return the error "Group not found"?
This error most often occurs if you misspelled the profile name. Check the exact name using the command netsh wlan show profiles Make sure to use quotation marks if the name contains spaces. The error may also occur if you didn't run the command prompt as administrator.
Where are WiFi passwords stored in the Windows registry?
Passwords are stored in a secure part of the registry and configuration files in the folder C:\ProgramData\Microsoft\Wlansvc\Profiles\InterfacesHowever, they are encrypted and not intended for direct reading. Using the command line is the only legal way to decrypt them on the fly for an authorized user.
Is it safe to save passwords in Windows?
Yes, Windows uses strong encryption to store WLAN keys. However, if an attacker gains physical access to your unlocked computer or has administrator privileges, they can use the methods described in this article to obtain passwords. It is recommended to use a logon password.
What should I do if the "Key Content" field is empty?
If the field is empty or contains asterisks, then you did not use the parameter key=clear in the command, or your account does not have administrator rights. Repeat the command, adding key=clear at the end, and make sure the CMD window is run as administrator.