It's quite common to need to connect a new device to your home or work network but have forgotten the Wi-Fi password. This applies if you already have a laptop or PC running an operating system connected to the network. Windows 10, restoring access through complex router settings is not necessary. The operating system stores the security keys of all previously used networks in a special secure storage.
The fastest and most technically sound way to extract this information is to use the command line, also known as CMDThis method doesn't require installing third-party software and allows you to see the real encryption key in seconds. In this article, we'll detail the steps to help you find your Windows 10 Wi-Fi password using Command Prompt without any hassle.
Using the console gives the user direct access to system network management utilities. This is more secure than the graphical interface, which in some Windows builds can obscure certain security settings. The command line allows you to get the password even for networks that are not currently connected, if they are saved in the system profile. Let's take a look at how to run this tool correctly.
Launch Command Prompt with Administrator Privileges
To execute system commands related to network profiles and security keys, the standard console mode is not sufficient. You must run the terminal with elevated privileges. This is a security requirement of the operating system. Windows 10, preventing unauthorized access to critical data.
There are several ways to open the desired tool. The easiest is to press a key combination. Win + X and select "Windows PowerShell (Administrator)" or "Command Prompt (Administrator)" from the menu that appears. In newer versions of the operating system, PowerShell has replaced the classic CMD, but it fully supports all the commands we need.
You can also use the system search. Click the magnifying glass icon in the taskbar or press Win, enter the word cmd"Command Prompt" will appear in the search results. Right-click on this icon and select "Run as administrator." If the system prompts you for confirmation, UAC (User Account Control), be sure to click "Yes".
After a successful launch, you'll see a black window with a blinking cursor next to the path to the system folder. This means the terminal is ready to accept instructions. Now we can move on to interacting with the network settings.
View a list of saved Wi-Fi networks
Before searching for a specific key, it's helpful to see a complete list of all wireless networks your computer has ever connected to. The operating system stores profiles of these connections, even if you're far from the access point or the router is turned off. To display this list, use the utility netsh.
Enter the following command in the window that opens and press Enter:
netsh wlan show profiles
The system will immediately display a block of information under the "User Profiles" heading. The "All User Profiles" column will list all known network users. Please note the exact spelling of the user names, including spaces and special characters, as they will be needed in the next step.
If the list is too long to fit on the screen, you can scroll up with your mouse wheel or use the scroll bar on the right. Make sure you find the desired network name in this list. If the network isn't there, your computer has never connected to it or the profile was previously deleted.
The profile's presence in this list is key. This confirms that the encryption key is physically located on your device's hard drive in encrypted form. All we need to do is use the command to decrypt and display it.
Command to display the password of a specific network
Now that we know the network name, we can request detailed profile information. We're specifically interested in the security key. To do this, we'll modify the previous command by adding a parameter. key=clearThis parameter instructs the system to display the key in clear, readable form, rather than as a set of asterisks or a hash sum.
The command syntax is as follows:
netsh wlan show profile name="NETWORK_NAME" key=clear
Instead of NETWORK_NAME You must substitute the exact name of your network that you found in the previous step. Note: if the network name is a single word and does not contain spaces, you can omit the quotation marks. However, if the name contains spaces (for example, Home Wi-Fi), the use of double quotes is strictly required.
☑️ Check before entering a command
After entering the command, press EnterA detailed profile report will appear on the screen. Find the "Security settings" section. Inside this section, look for the "Key Content" line. The value displayed next to this line is your password.
Deciphering network security parameters
The command output contains a wealth of technical information that can be useful for diagnosing connection issues. Understanding these parameters will not only help you find the password but also ensure the encryption settings are correct. In the security section, you'll see several important fields.
Particular attention should be paid to the type of authentication and encryption. Modern security standards require the use of a protocol WPA2-Personal or the newest WPA3If you see an outdated encryption type WEP, this is a sign of low network security, and you should change your password and update your router settings.
| Parameter | Description | Recommended value |
|---|---|---|
| Authentication type | Access rights verification method | WPA2-Personal |
| Encryption type | Data encoding algorithm | AES |
| Key content | The network password itself | (Your password) |
| Security type | Common Security Protocol | WPA2-Personal |
The report may also indicate whether the network is automatically connected. Setting "Connect Automatically" to "Yes" means Windows will initiate a connection when it detects this access point. This is convenient for home networks, but can be unsafe in public areas.
What should I do if the "Key Content" field is empty?
If the key field is empty or displays asterisks after running the command, this means your account doesn't have permission to read the key, or the profile is corrupted. Try running CMD as an administrator.
Alternative method via PowerShell
While the classic command line remains the most popular tool, Windows 10 And Windows 11 the shell is actively developing PowerShellIt offers more powerful functionality and may be more convenient for users accustomed to modern interfaces. The command syntax is slightly different, but the results are identical.
To get the password in PowerShell, you can use the same command netsh, as it's a system function, not specific to CMD. However, PowerShell allows you to output the data in a more convenient format or filter it. Run PowerShell as administrator and enter:
netsh wlan show profile name="NETWORK_NAME" key=clear
Visually, the output will look almost identical to the black command prompt window. PowerShell's main advantage in this context is the ability to copy a password directly from the terminal window by double-clicking (if quick edit is enabled) or using the clipboard via Ctrl+C.
⚠️ Note: In some corporate environments, security policies may prohibit the display of keys in cleartext, even for administrators. In this case, the command prompt will display an access denied message.
Using PowerShell also allows you to create scripts to automatically backup all Wi-Fi profiles, which can be useful for system administrators when migrating users to new computers.
Possible errors and solutions
When working with the command line, users may encounter various error messages. These are most often related to typos in the network name or insufficient access rights. Understanding the causes of these errors will help quickly troubleshoot the problem and retrieve the necessary data.
The most common error is "Network not found in profile." This occurs if you incorrectly entered the network name in quotation marks. Check the case (upper and lowercase letters matter) and the presence of spaces. Use the command netsh wlan show profiles again to copy the name exactly.
Another common issue is a message stating that the command requires elevated privileges. This means you forgot to run the console as an administrator. Close the window and run it again by selecting the appropriate option from the context menu. Without these privileges, the option key=clear it won't work.
If the system writes that the WLAN AutoConfig service is not running, you need to open the services (command services.msc), find "WLAN AutoConfig" in the list and start it. Without this service, Wi-Fi management in Windows is impossible.
Deleting and managing network profiles
Knowing how to view profiles is helpful in learning how to manage them. Over time, your network list can grow, including old access points you no longer use. This not only clutters your list but also potentially reduces security, as your computer may automatically attempt to connect to open or unsecured networks.
To delete a specific profile, use the command:
netsh wlan delete profile name="NETWORK_NAME"
After running this command, the profile will be completely removed from the system. If you try to connect to this network again, Windows will prompt you for the password again. This is a great way to "forget" a network if you've changed the password on your router and your computer continues to try to connect with the old, now incorrect, information.
⚠️ Note: Interfaces and commands may vary slightly depending on your Windows 10 or 11 build version. If a command doesn't work, check the official Microsoft documentation for your OS version.
Regularly cleaning profiles is a good PC maintenance practice. It prevents connection priority conflicts, where your laptop might latch onto a weak neighbor's signal instead of your powerful router simply because the neighbor's profile is higher on the priority list.
Frequently Asked Questions (FAQ)
Is it possible to find out the Wi-Fi password if the computer is not connected to it?
Yes, you can. The command line displays passwords for all networks whose profiles are saved on the system. The computer doesn't need to be in range of the network or connected to it. The main thing is that you've successfully entered the password and saved it on this device.
Is it safe to use the netsh wlan show profiles command?
Absolutely safe. This is a built-in Windows system utility designed for network diagnostics and management. It doesn't make any changes to the system, install any programs, or interfere with your antivirus software. You simply request the display of existing data.
What if the network name contains special characters?
If the network name contains spaces or special characters, be sure to enclose the name in double quotation marks. For example: name="My Home #1"If you don't include quotation marks, the system will consider part of the name a separate command and return a syntax error.
Does this method work on Windows 7 and 8?
Yes, team netsh wlan Works on all modern versions of Windows, starting with Windows Vista. The command syntax is identical for Windows 7, 8, 10, and 11. The only difference may be in how you run the command prompt as an administrator.
Is it possible to hack someone else's Wi-Fi this way?
No. This method only allows you to see passwords already stored on your computer. It can't brute-force passwords, scan the airwaves for vulnerabilities, or crack WPA2/WPA3 encryption. You still need a legitimate password to access someone else's network.