
How to Know Wifi Password in Windows 10? Use PowerShell
Introduction If you have ever connected your Windows 10 computer to a wireless network and later forgotten the password, you are not alone. This is especially common when a friend asks for the Wi-Fi password, when you buy a new device, or when you need to reco
Introduction
If you have ever connected your Windows 10 computer to a wireless network and later forgotten the password, you are not alone. This is especially common when a friend asks for the Wi-Fi password, when you buy a new device, or when you need to reconnect after resetting your router. The good news is that Windows 10 stores saved Wi-Fi profiles, including their security keys, on your device. In many cases, you can retrieve the password without resetting the router or guessing old combinations.
This guide explains How to Know Wifi Password in Windows 10? using PowerShell, along with related methods such as Windows Settings, Command Prompt, and your router’s admin panel. The PowerShell approach is especially useful because it can automate the process, display all saved network profiles, and help you find the password for a specific SSID in seconds. Throughout this article, you will also learn how to run commands safely, understand the output, troubleshoot common problems, and protect your network credentials.
Before you begin, make sure you are using your own computer and that you have permission to view or manage the network. Retrieving Wi-Fi passwords from devices you do not own or are not authorized to access can be a serious privacy and security violation.
Table of Contents
- Why You Might Need to Find Your Wi-Fi Password
- Common Methods for Finding a Wi-Fi Password in Windows 10
- Method 1: Find the Wi-Fi Password in Windows 10 Settings
- Method 2: Use the netsh Command
- Method 3: How to Know Wifi Password in Windows 10 Using PowerShell
- How to Run PowerShell as Administrator
- Understanding the Command Output
- Troubleshooting Common Errors
- Security and Privacy Considerations
- Alternative: Find the Password from Your Router
- Tips and Best Practices
- Comparison of Wi-Fi Password Recovery Methods
- Frequently Asked Questions
- Conclusion
Why You Might Need to Find Your Wi-Fi Password
There are many legitimate reasons to recover a saved Wi-Fi password. You may have changed the password months ago and forgotten it. You may have received a router from your internet service provider with a default password printed on a label that is now worn or missing. You may need to connect a smart TV, printer, gaming console, or phone to the same network. In business environments, IT staff may need to document network credentials securely for authorized users.
Windows 10 keeps a profile for each wireless network you connect to. That profile includes the SSID, authentication type, encryption type, and, in many cases, the password. Because the password is stored locally, you can retrieve it as long as you have the right permissions on the computer.
Common Methods for Finding a Wi-Fi Password in Windows 10
Windows offers more than one way to view a saved wireless password. The best method depends on your comfort level, the number of networks you need to check, and whether you want a quick one-time answer or an automated list.
- Windows Settings: Good for beginners, but it requires several clicks and only shows one network at a time.
- netsh command: A built-in network shell command that can display saved profiles and passwords.
- PowerShell: Ideal for automation, scripting, and viewing multiple profiles quickly.
- Router admin panel: Useful when the computer does not have the password saved or when you want to change the password directly.
Method 1: Find the Wi-Fi Password in Windows 10 Settings
If you prefer a graphical interface, Windows 10 Settings can reveal the password for the network you are currently using. This method does not require PowerShell or Command Prompt.
- Click the Start button and open Settings.
- Select Network & Internet.
- Click Status in the left menu.
- Scroll down and select Network and Sharing Center.
- Click your active Wi-Fi connection next to Connections.
- In the Wi-Fi Status window, click Wireless Properties.
- Go to the Security tab.
- Check the box labeled Show characters.
- The password appears in the Network security key field.
This method is simple, but it only works easily for the active connection. If you need passwords for networks you are not currently connected to, PowerShell or netsh is more efficient.
Method 2: Use the netsh Command
The netsh command is a powerful networking utility in Windows. It can list all saved wireless profiles and show the password for a selected profile. Even when you use PowerShell, you are often calling netsh behind the scenes because Windows does not provide a direct native cmdlet for reading saved Wi-Fi passwords in all scenarios.
To list saved profiles, open Command Prompt or PowerShell and run:
netsh wlan show profiles
Look for the profile name under All User Profile. Then run the following command, replacing YourNetworkName with the actual SSID:
netsh wlan show profile name="YourNetworkName" key=clear
In the output, find the line labeled Key Content. That value is the Wi-Fi password. If the network uses an open connection with no password, the Key Content field may be blank.
Method 3: How to Know Wifi Password in Windows 10 Using PowerShell
PowerShell is an excellent tool for automating repetitive tasks. Instead of running netsh separately for every network, you can use PowerShell to parse the output and display network names and passwords in a clean format. This is the focus of the article because it is fast, scriptable, and convenient for authorized troubleshooting.
Basic PowerShell Command for One Network
If you already know the network name, you can run a simple PowerShell command that calls netsh and filters the output. Open PowerShell as Administrator and run:
netsh wlan show profile name="YourNetworkName" key=clear | Select-String "Key Content"
This command runs netsh inside PowerShell and uses Select-String to show only the line containing the password. The password appears after the colon. This is a quick way to avoid reading the entire output.
If the SSID contains spaces or special characters, keep the quotation marks around the network name. For example:
netsh wlan show profile name="Home Wi-Fi 5G" key=clear | Select-String "Key Content"
Advanced PowerShell Script to List All Saved Wi-Fi Passwords
If you need to check several networks, use a PowerShell script that collects all saved profiles and their passwords. This is useful for authorized IT support, device migration, or personal record keeping.
$profiles = netsh wlan show profiles | Select-String "All User Profile" | ForEach-Object {
($_ -split ":")[1].Trim()
}
foreach ($profile in $profiles) {
$details = netsh wlan show profile name="$profile" key=clear
$passwordLine = $details | Select-String "Key Content"
if ($passwordLine) {
$password = ($passwordLine.ToString() -split ":")[1].Trim()
} else {
$password = "No password found or open network"
}
[PSCustomObject]@{
NetworkName = $profile
Password = $password
}
}
When you run this script, PowerShell displays a table-like list of network names and passwords. If a profile does not expose a password, the script reports that no password was found. This can happen with open networks, enterprise authentication, or profiles where Windows does not store a recoverable key.
Exporting Passwords to a File
You can extend the script to export results to a CSV file. This should be done carefully because the file will contain sensitive credentials.
$profiles = netsh wlan show profiles | Select-String "All User Profile" | ForEach-Object {
($_ -split ":")[1].Trim()
}
$results = foreach ($profile in $profiles) {
$details = netsh wlan show profile name="$profile" key=clear
$passwordLine = $details | Select-String "Key Content"
if ($passwordLine) {
$password = ($passwordLine.ToString() -split ":")[1].Trim()
} else {
$password = "No password found or open network"
}
[PSCustomObject]@{
NetworkName = $profile
Password = $password
}
}
$results | Export-Csv -Path "$env:USERPROFILE\Desktop\wifi-passwords.csv" -NoTypeInformation
After exporting, store the file in a secure location, avoid emailing it, and delete it when you no longer need it. Anyone who gains access to that file can connect to your wireless networks.
How to Run PowerShell as Administrator
Many netsh password queries require elevated privileges. If you run the command as a standard user, Windows may deny access to the key content. To run PowerShell as Administrator:
- Click the Start button.
- Type PowerShell.
- Right-click Windows PowerShell.
- Select Run as administrator.
- Click Yes on the User Account Control prompt.
If you are using Windows Terminal, you can also open it as Administrator and select the PowerShell profile. Once elevated, run the commands again. If you still see an access denied message, confirm that your account has local administrator rights.
Understanding the Command Output
When you run netsh wlan show profile name="NetworkName" key=clear, the output contains several useful fields. Understanding them helps you avoid misreading the password.
- Profile Name: The saved wireless network name.
- Connection mode: Usually automatic or manual.
- Authentication: Security type, such as WPA2-Personal or WPA3-Personal.
- Cipher: Encryption method, such as CCMP.
- Key Content: The actual Wi-Fi password.
- Cost: Network cost settings, often relevant for metered connections.
The password is not always in plain text in every environment. For example, enterprise networks using 802.1X may authenticate users with certificates or credentials rather than a shared password. In those cases, Windows may not display a simple shared key.
Troubleshooting Common Errors
Even though the process is straightforward, a few issues can prevent you from seeing the password. Here are common problems and solutions.
Profile Not Found
If PowerShell says the profile is not found, check the exact SSID. Network names are case-sensitive in some contexts and may include hidden characters. Run netsh wlan show profiles and copy the profile name exactly as shown.
Access Denied
This usually means PowerShell is not elevated. Close the window, reopen PowerShell as Administrator, and try again. Also verify that your user account is an administrator.
No Key Content Line
If there is no Key Content line, the network may be open, or Windows may not have stored a recoverable password. Enterprise networks often use individual credentials instead of a shared password.
Special Characters in SSID
If the network name includes quotes, spaces, or symbols, wrap it in double quotation marks. If the name itself contains double quotes, use single quotes around the entire command or rename the profile if possible.
Multiple Wireless Adapters
If your device has more than one Wi-Fi adapter, saved profiles may be associated with a specific interface. Use netsh wlan show profiles first to confirm which profiles are available.
Security and Privacy Considerations
Retrieving a Wi-Fi password is convenient, but it also exposes sensitive information. Anyone with administrator access to your computer can potentially read saved wireless passwords. This is why strong Windows account passwords and full-disk encryption are important.
- Only run password recovery commands on devices you own or are authorized to manage.
- Do not run unknown PowerShell scripts from untrusted websites.
- Avoid exporting passwords to unencrypted files unless necessary.
- Delete temporary CSV or text files after use.
- Change your Wi-Fi password if you suspect it has been exposed.
- Use WPA2 or WPA3 encryption rather than older WEP or open networks.
- Disable WPS if your router supports it and you do not need it.
If you are helping a friend or family member, ask them to run the commands themselves or supervise the process. This builds trust and avoids misunderstandings about privacy.
Alternative: Find the Password from Your Router
If Windows does not have the password saved, or if you want to change it, your router’s admin panel is another reliable source. Most routers display the wireless password in their settings.
- Connect to the router via Ethernet or an already connected device.
- Open a browser and enter the router’s IP address, often
192.168.1.1or192.168.0.1. - Log in with the router admin username and password.
- Look for Wireless, Wi-Fi, or WLAN settings.
- Find the password, security key, or passphrase field.
If you cannot access the router, check the physical label on the router. Many ISP-provided routers print the default SSID and password on a sticker. If the password was changed and forgotten, you may need to reset the router to factory settings, which will erase custom settings.
Tips and Best Practices
These tips make Wi-Fi password recovery safer and more effective.
- Use PowerShell ISE or Windows Terminal for easier command editing.
- Test commands on a non-critical network first.
- Keep your PowerShell execution policy in mind; the commands in this guide do not require changing it.
- Document network credentials in a password manager instead of plain text files.
- Use a unique, strong Wi-Fi password with at least 12 characters.
- Update your router firmware regularly.
- Review saved Wi-Fi profiles periodically and remove networks you no longer use.
- Use
netsh wlan delete profile name="NetworkName"to remove an old profile if needed.
Removing unused profiles not only cleans up your network list but also reduces the chance of connecting to an insecure or outdated network automatically.
Comparison of Wi-Fi Password Recovery Methods
| Method | Best For | Shows Saved Passwords | Requires Admin Rights | Difficulty |
|---|---|---|---|---|
| Windows Settings | Beginners and active connection only | Yes, for current network | Sometimes | Easy |
| netsh Command | Quick one-time lookup | Yes | Yes for key=clear | Medium |
| PowerShell | Automation and multiple profiles | Yes | Yes for key=clear | Medium |
| Router Admin Panel | Changing or recovering router password | Yes | Yes, router admin login | Medium |
Frequently Asked Questions
Can I find a Wi-Fi password in Windows 10 without admin rights?
Usually no. Viewing the saved key with key=clear generally requires administrator privileges. The Windows Settings method may also prompt for elevation depending on your system configuration.
Does PowerShell store my Wi-Fi password permanently?
No. PowerShell only displays the password that Windows already stores in the wireless profile. It does not create a separate permanent record unless you explicitly export it.
Why does Key Content not appear for some networks?
This can happen with open networks, enterprise authentication, or profiles where Windows did not store a recoverable shared key. In enterprise environments, authentication may rely on user credentials or certificates.
Is it safe to use PowerShell to find Wi-Fi passwords?
Yes, when used responsibly on your own device. The risk comes from exporting passwords, running untrusted scripts, or leaving sensitive files on your computer.
Can I use these commands in Windows 11?
Many of the same netsh and PowerShell concepts work in Windows 11, although menu paths in Settings may differ slightly. Always verify the current Windows version before following graphical steps.
What should I do if I forgot both the Wi-Fi and router passwords?
If the password is not saved on any device and you cannot access the router, you may need to reset the router to factory defaults. This will restore the default SSID and password printed on the router label.
Conclusion
Learning How to Know Wifi Password in Windows 10? is a practical skill for anyone who manages their own network. Windows Settings is the easiest option for the current connection, while netsh provides a quick command-line lookup. PowerShell goes further by allowing you to automate the process, filter output, and list passwords for all saved profiles. Whether you use a simple command or a full script, always treat Wi-Fi passwords as sensitive information.
By following the steps in this guide, you can recover saved wireless credentials safely, troubleshoot common errors, and improve your network security habits. Remember to run PowerShell as Administrator, use exact SSID names, and avoid exporting passwords unless absolutely necessary. With the right tools and precautions, finding a forgotten Wi-Fi password in Windows 10 becomes a straightforward task.