How to Show Your WiFi Password Using PowerShell (Step-by-Step)

Have you ever been in a situation where you need to connect a new device to your WiFi but can’t remember the password? It happens to the best of us. Fortunately, if you have a Windows PC that is already connected to that network, you can easily retrieve the password using PowerShell – a powerful command-line tool built right into Windows. This guide is for anyone who wants a quick, no-nonsense way to recover their WiFi password without installing extra software. By the end, you’ll be able to pull up any saved WiFi password on your machine in under a minute.


Whether you’re a tech-savvy user or a complete beginner, these steps are straightforward. We’ll use built-in Windows commands that work on Windows 10 and 11. No admin wizardry required – just a few copy-paste commands. Let’s dive in and get that password back.


What You’ll Need


  • A Windows PC (Windows 10 or 11) that has connected to the WiFi network before.
  • Administrator access to your computer (you’ll need to run PowerShell as admin).
  • The exact name (SSID) of the WiFi network you want the password for.


That’s it. No downloads, no third-party tools. Just your brain and these instructions.


Step 1: Open PowerShell as Administrator


First, we need to launch PowerShell with administrator privileges. There are several ways to do this. The easiest: press the Windows key, type “PowerShell”, right-click on “Windows PowerShell” in the search results, and select “Run as administrator”. If you see a User Account Control prompt, click “Yes” to allow it.


show wifi password powershell PowerShell run as administrator Windows context menu screenshot

Once PowerShell opens, you’ll see a blue window with a blinking cursor. You’re ready for the next step.


Step 2: List All Saved WiFi Profiles


Now, let’s see all the WiFi networks your computer has connected to and saved. Type the following command and press Enter:


netsh wlan show profiles

PowerShell command


This will display a list of all user profiles. Look for the one that matches your network name (SSID). For example, if your WiFi is named “HomeWiFi”, you’ll see it in the list. Note the exact spelling and capitalization – you’ll need it later.


show wifi password powershell PowerShell showing list of WiFi profiles netsh command

If you have many profiles, you can also filter by name using: netsh wlan show profiles name=”YourNetworkName”. But for now, just get the exact name.


Step 3: Show the Password for a Specific Profile


Once you have the profile name, type the following command, replacing “YourNetworkName” with your actual WiFi name:


netsh wlan show profile name=”YourNetworkName” key=clear

PowerShell command


Press Enter. The command will output a bunch of information. Scroll down until you see “Key Content” – that’s your WiFi password! It will be listed under the “Security settings” section. For example:


Key Content : MySecretPassword123

Sample output


show wifi password powershell PowerShell showing WiFi password in key content field

That’s it. You now have your WiFi password. You can copy it (select text, right-click to copy) or write it down. Keep in mind that this only works for profiles saved on your PC.


Common Pitfalls


Even with simple steps, things can go wrong. Here are the most common issues and how to fix them.


  • You didn’t run PowerShell as Administrator: If you get an error like “The request is not supported” or no password appears, chances are you opened PowerShell without admin rights. Close it and reopen as Administrator. This is the most common mistake.
  • You typed the profile name incorrectly: The profile name is case-sensitive and must match exactly. If your network is named “Guest_WiFi”, typing “guest_wifi” won’t work. Use the list from Step 2 to copy-paste the exact name.
  • The network profile doesn’t exist on your PC: If you never connected to that WiFi on this computer, it won’t appear. In that case, you’ll need to use other methods, such as checking your router settings or using a phone that is connected. For more options, check out our how to recover WiFi password guide.


Another tip: If you see “There is no profile” error, double-check the spelling and try running the command with quotes around the name.


Where to Next


Now that you know how to recover your password via PowerShell, you might want to explore other methods. If you need to get the password without admin access, our WiFi password recovery without admin access article covers that. For a broader perspective, the WiFi password recovery complete guide has methods for all devices. And if you’re on a different platform, you can find saved WiFi password on your laptop for macOS or export WiFi passwords on Linux. Happy surfing!

Leave a Reply

Your email address will not be published. Required fields are marked *