How To Get A Wifi Password Using Cmd

4 min read

Learning how to get a wifi password using cmd can save time when you need to reconnect a device but have forgotten the network key. Windows stores all previously connected Wi‑Fi passwords in a hidden system folder, and the Command Prompt provides a quick, built‑in method to retrieve them without third‑party software. This guide walks you through the exact steps, explains the underlying technology, and answers common questions so you can handle the process confidently and safely.

Introduction

Every time your Windows laptop or tablet connects to a wireless network, the operating system saves the security key (password) locally. This cache allows your device to reconnect automatically whenever the network is in range. On the flip side, if you switch phones, reset your computer, or help a friend connect, you may need to recover that stored password. Using the Command Prompt (cmd) is the most direct way to view these saved credentials, provided you have administrative rights on the machine.

Steps to Retrieve a Wi‑Fi Password Using CMD

  1. Open Command Prompt as Administrator
    Press Win + X, select "Windows Terminal (Admin)" or "Command Prompt (Admin)". If prompted by User Account Control, click "Yes" Worth knowing..

  2. List All Saved Wi‑Fi Profiles
    Type the following command and press Enter:

    netsh wlan show profiles
    

    This will display

This will display a list of every Wi‑Fi network name (profile) that Windows has stored on this machine. Plus, each entry appears under the "User Profiles" heading. Locate the exact name of the network whose password you want to recover.

  1. View the Password for a Specific Network
    Type the command below, replacing NETWORK_NAME with the profile name from the previous step, then press Enter:

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

    To give you an idea, if the network is called "HomeWiFi", you would run:

    netsh wlan show profile name="HomeWiFi" key=clear
    
    
  2. Locate the Key Content
    Scroll through the output until you reach the "Security settings" section. Under "Key Content" you will see the password in plain text. The line "Key Content = yourpassword" is the wireless key you can use to connect another device.

How It Works

The netsh (Network Shell) utility is a scripting interface built into Windows for managing network configuration. When you connect to a Wi‑Fi network, Windows encrypts the security key and stores it alongside the profile in a system database. The key=clear parameter instructs netsh to decrypt and display that stored key rather than masking it. Because this data lives in a protected system location, the command must run with elevated (administrator) privileges Small thing, real impact..

Important Notes and Safety

  • You can only recover passwords for networks this computer has connected to before. There is no way to reveal the key for a network that was never joined.
  • This method requires local administrator access. If the account lacks admin rights, the commands will fail.
  • The recovered password is shown in plain text, so be mindful of who can see your screen. Avoid sharing it in public or recording it in unsecured notes.
  • Use this only on networks you own or are authorized to access. Retrieving a password to connect your own devices is legitimate; attempting to access someone else's network without permission is not.

Frequently Asked Questions

Can I do this on Windows 11?
Yes. The steps are identical on Windows 10 and 11, since both rely on the same netsh tool Worth knowing..

What if the command says "profile not found"?
Double-check the network name for typos and confirm it appears in the list from netsh wlan show profiles. Names are case-sensitive when wrapped in quotes.

Does this work for Ethernet or mobile hotspots?
This method retrieves saved Wi‑Fi profiles specifically. Wired connections and some virtual adapters do not store a "key" in the same way.

Is there a risk to my computer?
No. netsh wlan show profile is a read-only command that simply displays existing information; it does not modify your system.

Conclusion

Recovering a forgotten Wi‑Fi password with Command Prompt is a fast, reliable process that uses tools already built into Windows. By listing your saved profiles with netsh wlan show profiles and then revealing the key with the key=clear parameter, you can retrieve any stored network password in seconds without installing additional software. Just remember to run the commands as an administrator, handle the exposed password carefully, and use the technique only on networks you are authorized to access. With these steps in hand, reconnecting a new device or helping a friend join your network becomes a simple, one‑minute task.

What's Just Landed

New on the Blog

Kept Reading These

Similar Reads

Thank you for reading about How To Get A Wifi Password Using Cmd. We hope the information has been useful. Feel free to contact us if you have any questions. See you next time — don't forget to bookmark!
⌂ Back to Home