Setup and Configuration

How to Find My Wifi Password on Pc? Via Command Line

Introduction Losing track of your WiFi password is more common than most people care to admit. Whether you just bought a new laptop, a friend is visiting and needs to get online, or you reset your router and can’t remember the default key, being able to recove

HowToFixWiFi

Introduction

Losing track of your WiFi password is more common than most people care to admit. Whether you just bought a new laptop, a friend is visiting and needs to get online, or you reset your router and can’t remember the default key, being able to recover a saved wireless password on your computer can save you a frustrating call to your internet service provider. If you have ever searched for How to Find My Wifi Password on Pc?, you are not alone.

Most Windows users know how to check their password through the graphical interface, but fewer realize that the command line offers a fast, reliable, and scriptable way to do the same thing. Using built-in tools like Command Prompt and PowerShell, you can reveal passwords for any wireless network your PC has previously connected to—provided you have administrative access.

In this guide, we will walk through exactly How to Find My Wifi Password on Pc? using the command line. We will cover the necessary prerequisites, the difference between Command Prompt and PowerShell, step-by-step methods for listing saved networks and revealing individual passwords, troubleshooting tips, security best practices, and answers to frequently asked questions. By the end of this article, you will be able to recover your WiFi password quickly without installing any third-party software.

Table of Contents

Why You Might Need to Find Your WiFi Password

There are plenty of legitimate reasons to look up a saved WiFi password on your PC. Perhaps the most common scenario is setting up a new device. You might have a smartphone, tablet, smart TV, or gaming console that needs to join your home network, but the password was written on a piece of paper that has since disappeared. Instead of resetting your router and reconnecting every single device in your house, you can simply pull the password from a computer that is already connected.

Another common reason is guest access. When friends or family come over, they often ask for the WiFi password so they can stream videos, check email, or upload photos. If you do not want to log into your router’s admin panel just to read a password, checking your PC is a much faster alternative.

You might also need the password after a system reinstall or Windows upgrade. If you backed up your files but forgot to export your network credentials, any PC that previously joined the network still holds that information in its wireless profile store. Recovering it from the command line avoids the hassle of contacting your ISP or hunting through old emails for setup details.

Finally, some users need the password for documentation or auditing purposes. IT professionals and small business owners sometimes keep records of network keys for compliance or troubleshooting. Knowing how to retrieve saved credentials locally can be part of a responsible network management workflow.

Prerequisites Before You Begin

Before you attempt any of the command line methods described below, make sure your computer meets a few basic requirements. First, you need a Windows PC. The commands in this guide use netsh wlan, which is native to Windows operating systems including Windows 10 and Windows 11.

Second, you must have administrative privileges. Revealing wireless passwords is considered a sensitive operation because it exposes network security keys. Windows therefore requires you to run Command Prompt or PowerShell as an administrator. If you try to run these commands from a standard user prompt, you will likely receive an access denied error.

Third, the PC must have previously connected to the WiFi network in question. Windows only stores passwords for networks it has joined before. If you have never connected your computer to that specific network, there will be no profile to query, and no command will magically retrieve a password from thin air.

Fourth, you should know the exact name of the wireless network, also called the SSID. WiFi network names are case-sensitive, so HomeWiFi and homewifi are treated as different networks. You can discover the exact name by listing saved profiles, which we will cover in the next sections.

Last, while an active internet connection is not strictly necessary, it helps to be within range of the network or at least have the PC powered on and awake. The command line reads from local configuration files, not from a remote server, so you do not need an active connection to the router itself.

Command Line Overview: Command Prompt vs PowerShell

Windows offers two primary command line environments for this task: Command Prompt (CMD) and PowerShell. Both can run the netsh utility, which is the underlying tool that interacts with Windows wireless networking settings. However, there are slight differences in how you launch them and how comfortable you might feel using each one.

Feature Command Prompt (CMD) PowerShell
Built into Windows Yes Yes
Uses netsh for WiFi passwords Yes Yes
Admin rights required Yes Yes
Syntax familiarity Classic DOS-style commands Modern cmdlet-based syntax
Output formatting Plain text Objects and plain text
Best for this task Quick, one-off lookups Scripting and automation

In practice, the actual commands you type are almost identical because PowerShell can execute netsh commands directly. If you are already comfortable with PowerShell, there is no harm in using it. If you just want the fastest path to your password, Command Prompt is perfectly fine. The choice comes down to personal preference rather than any technical limitation.

Method 1: Using Command Prompt with netsh

This is the most straightforward way to answer How to Find My Wifi Password on Pc? The netsh command, short for network shell, has been part of Windows for many years and remains the go-to tool for wireless network management.

Step 1: Open Command Prompt as Administrator

  1. Press the Windows key on your keyboard or click the Start button.
  2. Type cmd or Command Prompt.
  3. Right-click on Command Prompt in the search results.
  4. Select Run as administrator.
  5. If a User Account Control prompt appears, click Yes.

You should now see a black Command Prompt window with a title bar that includes the word Administrator.

Step 2: List All Saved WiFi Profiles

Before you can view a password, you need to know the exact name of the wireless profile. Type the following command and press Enter:

netsh wlan show profiles

Windows will display a list of all wireless networks your computer has ever connected to. Look under the section labeled User profiles. Each entry will look something like this:

User profiles
-------------
All User Profile     : HomeWiFi
All User Profile     : CoffeeShop_Guest
All User Profile     : Office_Network

Copy the exact name of the network you are interested in, including capitalization and spaces. You will need it for the next step.

Step 3: Reveal the Password for a Specific Network

Now that you have the network name, use the following command to display its security settings. Replace YOUR_NETWORK_NAME with the actual SSID you copied in the previous step, keeping the quotation marks:

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

For example, if your network is called HomeWiFi, the command would be:

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

Press Enter. Windows will print a detailed report about that wireless profile.

Step 4: Locate the Password in the Output

Scroll through the output until you find the Security settings section. Inside that section, look for a line labeled Key Content. The text immediately to the right of Key Content is your WiFi password.

It might look like this:

Security settings
-----------------
Authentication        : WPA2-Personal
Cipher                : CCMP
Security key          : Present
Key Content           : mySecretPassword123

In this example, mySecretPassword123 is the password. You can now copy it and use it to connect other devices.

Method 2: Using PowerShell to Find WiFi Passwords

PowerShell is Windows’ more modern command line shell. While it does not have a dedicated built-in cmdlet specifically named Get-WiFiPassword, it can run netsh commands just like Command Prompt. If you prefer PowerShell, the process is nearly identical.

Step 1: Open PowerShell as Administrator

  1. Press the Windows key or click Start.
  2. Type PowerShell.
  3. Right-click Windows PowerShell or PowerShell in the results.
  4. Choose Run as administrator.
  5. Confirm the User Account Control prompt by clicking Yes.

Step 2: List Saved Wireless Profiles

Type the same netsh command used in Command Prompt:

netsh wlan show profiles

Review the list and identify the exact name of the network whose password you want to recover.

Step 3: Show the Password

Run the profile command with the key=clear switch:

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

Substitute your actual network name inside the quotation marks. Press Enter and look for the Key Content line under Security settings, exactly as described in the Command Prompt method.

PowerShell-Specific Tips

Because PowerShell treats output as objects, advanced users can parse the results programmatically. For example, you could filter the output to show only the password line, though that requires more complex scripting and is unnecessary for a one-time lookup. For most users, simply running the netsh command and reading the plain text output is the fastest approach.

Method 3: Listing All Saved WiFi Profiles

Sometimes you do not remember the exact name of your network, or you want to see every network your PC has ever joined. Listing all saved profiles is a useful preliminary step before revealing any password.

Open Command Prompt or PowerShell as administrator and run:

netsh wlan show profiles

The output groups networks under User profiles. Each profile represents a wireless network your computer has connected to at least once. If you see many entries, it might be because your PC has joined public hotspots, office networks, or friends’ networks in the past.

If the list is empty, it means Windows has no saved wireless profiles on this machine. In that case, there is no password to recover using this method, and you would need to check your router or set up a new connection.

You can also export the list to a text file for easier reading:

netsh wlan show profiles > C:\Users\YourName\Desktop\wifi-profiles.txt

This creates a text file on your desktop containing all profile names, which you can open in Notepad.

Method 4: Revealing the Password for a Specific Network

Once you have identified the exact network name from the profile list, revealing the password is a single command away. This is the core of How to Find My Wifi Password on Pc? and works the same way regardless of whether you use Command Prompt or PowerShell.

Run:

netsh wlan show profile name="Exact-Network-Name" key=clear

Important details to keep in mind:

  • The network name must match exactly, including uppercase and lowercase letters.
  • Quotation marks are required if the network name contains spaces.
  • The key=clear switch tells Windows to display the password in plain text rather than hiding it.

After the command runs, locate the Security settings block. The Key Content field contains the password. If that field says Key Content : with nothing after it, the password may not be stored in a recoverable format, or you may not have sufficient permissions.

You can repeat this process for as many saved networks as you like. There is no limit to how many profiles you can query, as long as they exist on your PC.

Troubleshooting Common Issues

Even with a simple command, things can go wrong. Here are the most common problems people encounter when trying to find their WiFi password on a PC, along with solutions.

Access Denied or Administrator Required

If you see an error saying you do not have permission or that the requested operation requires elevation, you did not run Command Prompt or PowerShell as administrator. Close the window and reopen it using Run as administrator, then try again.

The Wireless Profile Is Not Found

This usually means you typed the network name incorrectly. WiFi names are case-sensitive. Double-check the exact spelling by running netsh wlan show profiles again and copying the name directly from the output.

No Profiles Listed

If the profile list is empty, your computer has never connected to a wireless network, or the profiles were deleted. You cannot recover a password that was never saved. Check another device that is connected, or log into your router’s admin panel.

Key Content Is Blank

Occasionally, Key Content appears without a password next to it. This can happen on domain-joined computers where wireless policies are managed by an organization, or if the password is stored using a method that does not allow plain-text extraction. In those cases, you will need to contact your network administrator or reset the router password.

Command Not Recognized

It is rare, but if netsh is not recognized, your system path variables may be corrupted. You can try running the command from its full location:

C:\Windows\System32
etsh.exe wlan show profiles

Security Best Practices After Revealing Your Password

Finding your WiFi password is useful, but handling that information responsibly is just as important. Once you have recovered your password, consider the following best practices.

First, avoid sharing your password over email, text messages, or social media. If you need to give a guest access, consider setting up a separate guest network on your router if your hardware supports it. That way, visitors can get online without accessing your main network or your shared files.

Second, if you suspect your password has been compromised, change it immediately. Log into your router’s administration page, update the WiFi passphrase to something strong and unique, and reconnect your devices. A strong password should be at least 12 characters long and include a mix of uppercase letters, lowercase letters, numbers, and symbols.

Third, make sure your router is using WPA2 or WPA3 encryption. Older standards like WEP are easily cracked and should not be used. You can usually check the encryption type in the same netsh output under Authentication and Cipher.

Fourth, change your router’s default administrator username and password. Many routers ship with well-known default credentials like admin and password. Leaving those unchanged allows anyone on your network to take control of your router.

Finally, do not save WiFi passwords in plain text files on your desktop or in unsecured notes apps. If you need to store them, use a reputable password manager with encryption.

Alternative Methods (Non-Command Line)

If you are not comfortable using the command line, Windows offers graphical ways to find your WiFi password. These methods are useful if you prefer clicking through menus rather than typing commands.

Using Windows Settings

  1. Open Settings.
  2. Go to Network & Internet.
  3. Select WiFi and then Manage known networks.
  4. Click on your network and choose Properties.
  5. Look for the security key or password field. You may need to check a box to show characters.

Note: In some versions of Windows 10 and 11, the Settings app only shows the password for the network you are currently connected to, not for previously saved networks.

Using Control Panel

  1. Open Control Panel.
  2. Go to Network and Sharing Center.
  3. Click on your active WiFi connection name.
  4. In the WiFi Status window, click Wireless Properties.
  5. Go to the Security tab.
  6. Check the box labeled Show characters to reveal the password.

Using Your Router’s Admin Page

If you can log into your router’s web interface, you can view or change the WiFi password there. Common router addresses include 192.168.1.1 or 192.168.0.1. You will need the router’s admin username and password, which is often printed on a sticker on the device itself.

Third-Party Tools

There are third-party utilities that claim to reveal all saved WiFi passwords at once. While some are legitimate, others carry security risks. Because Windows already provides the built-in netsh tool for free, there is generally no need to install additional software just to recover a password you already own.

Frequently Asked Questions

Can I find the password for a WiFi network I have never connected to?

No. Windows only stores passwords for networks your PC has previously joined. If you have never connected to a network, there is no saved profile to query, and the command line cannot retrieve a password from the router remotely.

Do I need administrator rights to find my WiFi password?

Yes. Revealing the Key Content of a wireless profile is a protected operation. You must run Command Prompt or PowerShell as an administrator to see the password in plain text.

Will this show the current router password or just saved ones?

The command line method shows passwords for networks your computer has saved. If you changed your router password after your PC last connected, the saved password may be outdated. To get the current password, check the router itself or another device that is actively connected.

Is it safe to use the command line for this?

Yes. The netsh wlan commands are built into Windows and do not install software or modify system settings. They simply read existing wireless profile data and display it on your screen.

Can I do this on a Mac or Linux PC?

This guide focuses on Windows because netsh wlan is a Windows utility. Mac and Linux use different commands and configuration files to manage wireless credentials. The general principle—retrieving saved passwords from local configuration—applies, but the steps are different.

What if Key Content is blank?

A blank Key Content usually means the password is not stored in a recoverable format on that PC, or your user account lacks permission to view it. Try running the command prompt as administrator again. If it remains blank, you will need to obtain the password from another device or the router.

Can I export all saved WiFi passwords at once?

Windows does not provide a single built-in command to export every password in plain text automatically. You must query each profile individually using netsh wlan show profile name="NAME" key=clear. Advanced users can script this process in PowerShell, but for most people, checking one network at a time is sufficient.

Is it legal to look up my own WiFi password?

Yes. Recovering a password for a network you own or have permission to use is perfectly legal. However, attempting to access networks you do not own or have permission to join is illegal and unethical.

Conclusion

You now know several reliable ways to answer How to Find My Wifi Password on Pc? using only the tools already built into Windows. Whether you prefer Command Prompt or PowerShell, the netsh wlan commands give you direct access to saved wireless profiles and their passwords without needing extra software.

Remember to run your command line as administrator, use the exact network name as it appears in your profile list, and look for the Key Content field under Security settings. If you run into trouble, the troubleshooting section covers the most common issues, from permission errors to blank password fields.

Once you have your password, handle it responsibly. Share it only with people you trust, consider using a guest network for visitors, and make sure your router is using modern encryption. If you ever suspect your network security has been compromised, change your password promptly.

With this knowledge, you will never have to hunt through old paperwork or call your internet provider just to reconnect a device. The command line puts the answer right at your fingertips.