How to find out the Wi-Fi password from a computer connected via a wire

It's quite common to need to find a saved password for a wireless network, but all you have is a desktop computer connected to the router via cable. This might be necessary to connect a new gadget, invite guests, or simply if your notes are lost. Fortunately, the Windows operating system stores the security keys for all networks a device has ever connected to, even if the connection is currently over a LAN.

Unlike laptops, where you can simply view the adapter settings, PCs often lack a built-in Wi-Fi module, forcing users to seek workarounds. However, a wired connection gives you direct access to the router configuration and system key storage. The main task - correctly interpret system data or log into the device's admin panel.

In this article, we'll cover several proven methods, from simple console commands to advanced router configuration. You'll learn how to safely extract WPA2-PSK or WPA3 keys using standard Windows tools, without installing third-party software. It's important to understand that you'll need administrator rights to successfully complete these operations.

Using the command line to get the key

The fastest and most reliable way to find out your password is to use the built-in utility netshThis method works on all modern versions of Windows, from 7 to 11, and doesn't require a graphical interface. The command line directly accesses wireless network profiles stored in the system and displays their settings in text format.

First, you need to open the console with administrator rights. Press the key combination Win + X and select "Windows PowerShell (Administrator)" or "Command Prompt (Administrator)." In the window that opens, first list all saved profiles to ensure the desired network is present. Enter the command:

netsh wlan show profiles

Once the list appears, find your network name (SSID). Next, to view the password, you'll need to request detailed information for a specific profile, displaying the security keys. The command syntax requires the exact network name. If the name contains spaces, it must be enclosed in quotation marks.

Enter the following construction, replacing Network_Name to the real name of your Wi-Fi:

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

In the report that opens, find the "Security settings" section. We are interested in the line Key content (Key Content). The value specified next to this line is the password you're looking for. This method is useful because it reveals the exact key used to encrypt traffic.

⚠️ Attention: The command line is case-sensitive and space-sensitive. If you misspell even one character in the network name, the system will display a message about the missing profile. Copy the network name from the profile list to avoid typos.

Viewing the password through the network connections graphical interface

Not all users are comfortable with the black console window. Fortunately, Windows allows you to view saved passwords through the standard settings menu, although the path to this option may vary across OS versions. This method is more visual, but requires several menu navigations.

In Windows 10 and 11, the logic is as follows: first, you need to go to the Network and Sharing Center. Click Win + R and enter the command ncpa.cplThe "Network Connections" window will open. Here you'll see your Ethernet adapter (connected via wire). Although the Wi-Fi password isn't stored in the Ethernet cable's properties, the system aggregates data about known networks in a shared storage.

However, there is no direct "Show password" button for others Networks (other than the one you're currently connected to) aren't listed in the standard adapter interface. But if you've ever connected to that network from this PC (even if you're currently connected via cable), the profile is active. In Windows 11, the path has become shorter: Settings → Network & Internet → Wi-Fi → Manage known networksSelect the desired network and click the "View" button next to the password field.

In older versions or when using the classic method via the Network and Sharing Center:

  • 📡 Go to "Network and Sharing Center" (you can find it through the Start search).
  • 🔗 On the left, select "Change adapter settings".
  • ⚙️ Look for the "Wireless Network" icon (even if there is no signal right now, the profile may be displayed) or use the properties of your current connection if it broadcasts security information.
  • 🔑 In the status window, click the "Wireless Network Properties" button, go to the "Security" tab, and check the "Show characters" box.

If you don't have an active Wi-Fi module on your PC, this method may not work directly through the adapter interface, as Windows won't create a virtual interface for a network you can't physically connect to. In this case, revert to the method with netsh or logging into the router is the only correct solution.

📊 Which method is more convenient for you to use?
Command Prompt (CMD)
Windows graphical interface
Login to router settings
Third-party programs

Logging into the router's web interface: a universal method

If your computer is connected to the router via a cable (LAN), you're within the device's local network. This gives you full access to its settings. The router's web interface is where all your settings are stored. main parameters wireless network, including the current password. This method works regardless of your computer's operating system.

To log in, you need to know the gateway IP address. This is usually 192.168.0.1, 192.168.1.1 or 192.168.31.1 (for Xiaomi). To find the exact address, open the command line and enter ipconfigFind the "Default Gateway" line for your Ethernet connection. Enter this IP address into the address bar of any browser.

The system will ask for your login and password. If you have never changed them, they are located on a sticker on the bottom of the router (often admin/admin). If the data has been changed and forgotten, you will have to reset the router to factory settings using the button Reset, which will lead to a temporary internet outage.

Once inside, look for sections titled:

  • 📶 Wireless
  • 🔐 Wi-Fi Settings
  • 🏠 WLAN (Local Area Network)

Within these sections, find the field Wireless Password, WPA Pre-Shared Key or simply "Password." It's often hidden behind asterisks. There might be an eye next to it or a "Show Password" checkbox. If there's no such toggle, you can simply copy the value (Ctrl+C), paste it into Notepad, and see the characters, or temporarily replace the password with a new one and save the changes.

⚠️ Attention: Router interfaces (TP-Link, Asus, D-Link, Keenetic) are constantly being updated. Menu locations may vary. If you can't find the settings, consult the official manual for your specific model on the manufacturer's website.

Using PowerShell for Advanced Users

PowerShell is a more powerful tool than the classic CMD, allowing you to work with Windows objects. It can be used not only to display a password, but also to export it to a file or transfer it to another program. This method is especially useful if you need to quickly access a key and copy it to the clipboard in a single line.

Run PowerShell as administrator. To get the password for a specific network, you can use the following script. It finds the profile and displays only the key field, removing unnecessary information:

$ssid = "Your_Network_Name"

$profile = netsh wlan show profile name="$ssid" key=clear

$profile | Select-String "Key Content"

However, a more elegant way is to use built-in cmdlets for managing WLAN, if they are available in your version of Windows. But the classic call netsh Internally, PowerShell remains the most compatible option. PowerShell's main advantage is its automation capabilities. You can create a script that will display passwords for all known networks in a convenient list.

An example script for displaying all passwords at once:

$networks = netsh wlan show profiles | Select-String -Pattern " : "

foreach ($network in $networks) {

$ssid = $network -replace ".*: ", ""

$pass = netsh wlan show profile name="$ssid" key=clear | Select-String "Key Content"

$pass = $pass -replace ".*: ", ""

Write-Host "SSID: $ssid | Password: $pass"

}

This code will go through all saved profiles and display their names and passwords. the only way Mass restore access to all access points ever visited without manually entering commands for each of them.

Why is PowerShell better than CMD?

PowerShell processes command output as objects, not just text. This allows for flexible filtering of data, storing it in variables, and passing it between programs, which is impossible in a standard command line without complex tricks.

Analysis of the command table for quick access

For ease of reference and quick search of the command you need, we've organized the main actions in a table. These commands are valid for Windows 10 and 11. Make sure you run the console with administrator privileges, otherwise some requests may be rejected by the security system.

Task Team Parameter description
Show all profiles netsh wlan show profiles Lists all saved SSIDs.
View password netsh wlan show profile name="NAME" key=clear NAME is the network name, key=clear shows the key
Delete profile netsh wlan delete profile name="NAME" Completely removes network settings from the system
Find out the gateway IP ipconfig Shows the address to log into the router (Gateway)

Using these commands allows you to quickly diagnose connection problems. For example, if you can't connect, sometimes deleting the old profile (delete profile) and reconnect with the correct password. This clears the security settings cache.

☑️ Check before entering commands

Completed: 0 / 4

Common mistakes and how to solve them

When recovering passwords, users often encounter common errors. Understanding their causes can save time. The most common issue is the message "The WLAN AutoConfig service is not running." Without this service, Windows cannot manage wireless connections, even if the adapter is physically present.

To correct, click Win + R, enter services.mscFind the "WLAN AutoConfig" service (or "WLAN AutoConfig Service") in the list. Make sure the startup type is set to "Automatic," and click "Start" if it's stopped. Then try to retrieve the password again.

Another error is "Access Denied." This is a clear indication that the console is running as a standard user, not an administrator. Even if you're the only user on the PC, accessing system encryption keys requires elevated privileges. Simply right-click the CMD shortcut and select the appropriate option.

It's also worth mentioning the encoding issue. If your network name contains Cyrillic or special characters, they may appear as gibberish in the console. In this case, it's best to use the router login method or rename the network (SSID) in the router settings to Latin characters, which will also improve compatibility with older devices.

Is it possible to find out the password if I have never connected to this network from this PC?

No, this can't be done directly from Windows. The system only stores the keys used for a successful connection. However, if your PC is connected to the router via cable, you can access the router settings (see the section above) and view the password there, as it's stored in the router's memory.

Is it safe to use third-party password recovery programs?

Using programs like WirelessKeyView by NirSoft is acceptable, but requires caution. Antivirus programs often flag them as "HackTools" because they extract saved keys. Download such utilities only from the developers' official websites to avoid introducing real viruses.

What should I do if my router requires a password to log in, but I don’t remember it?

If the default admin/admin passwords don't work and you haven't changed the password yourself, your ISP may have changed it. Try finding the password on the sticker underneath the device. In extreme cases, pressing the reset button for 10-15 seconds will help. This will reset the router to factory settings, but you'll have to set up your internet connection again.

Do these methods work on Windows 7 and XP?

Yes, team netsh wlan works starting with Windows Vista. However, in Windows XP the command netsh wlan didn't yet have this functionality. With XP, the only way was to log into the router's web interface or use third-party software, as the wireless network API was just beginning to take shape.