Windows OS Hub
  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu

 Windows OS Hub / Windows 10 / View Saved Wi-Fi Passwords on Windows 10

June 10, 2021 PowerShellWindows 10

View Saved Wi-Fi Passwords on Windows 10

Windows allows to save passwords used to connect to Wi-Fi networks. Due to it, if a known Wi-Fi network is within range of your wireless network adapter, Windows can automatically connect to it without asking for a password. In this article we’ll show how to extract saved passwords for Wi-Fi networks on Windows 10, transfer the list of saved wireless networks with the security keys to other computers, and how to remove (forget) certain WLANs.

In Windows 10, you can view both the active Wi-Fi network password and passwords of all wireless networks your device has ever connected to.

Contents:
  • How to Find the Current Wi-Fi Password on Windows 10?
  • List Saved Wi-Fi Passwords on Windows 10 Using Command Prompt
  • Display All Saved Wi-Fi Passwords Using PowerShell
  • How to Export and Import WLAN Profiles on Windows 10?
  • How to Forger a Saved Wi-Fi Network on Windows 10?

How to Find the Current Wi-Fi Password on Windows 10?

If your Windows 10 device is connected to a Wi-Fi network, you can view its password (security key) through  the Control Panel:

  1. Click Start -> Settings -> Network & Internet -> Status -> Network and Sharing Center -> Change adapter settings;
    To immediately open the Network Connections window, use the ncpa.cpl command.
  2. Right-click your wireless network adapter and select Status; wi-fi connection status
  3. Go to the Security tab and set the “Show characters” checkbox;
  4. The security key (password) of currently connected (active) Wi-Fi network is specified in the “Network security key” field.
    show wi-fi network security key on windows 10

List Saved Wi-Fi Passwords on Windows 10 Using Command Prompt

Above, we have shown how to get the password of the current Wi-Fi connection on Windows 10. However, you can view a password of any wireless network to which your device has previously connected. This info is only available in the command prompt using the built-in netsh tool.

When you connect to a Wi-Fi network, Windows creates a WLAN profile for it containing a network name (SSID), a password (a security key) and some Wi-Fi security options used to connect to the wireless access point. You can display the list of saved WLAN profiles using the following command:

netsh wlan show profile

netsh wlan show profile - list saved WLANs on Windows 10 via CMD

To get information about a specific WLAN profile and its saved password, you need to specify its SSID. For example:

netsh wlan show profile “Xiaomi_10D1” key=clear

netsh wlan show profile key=clear

Profile Xiaomi_10D1 on interface Wi-Fi:
=======================================================================
Applied: All User Profiles
Profile information
--------------------------
Version: 1
Type: Wireless LAN
Name: Xiaomi_10D1
Control options:
Connection mode: Connect automatically
Network broadcast: Connect only if this network is broadcasting
AutoSwitch: Do not switch to other networks
MAC randomization: Disabled
Connectivity settings
---------------------
Number of SSIDs: 1
SSID name: "Xiaomi_10D1"
Network type: Infrastructure
Radio type: [ Any Radio Type ]
Vendor extension: Not present
Security settings
----------------------
Authentication: WPA2-Personal
Cipher: CCMP
Authentication: WPA2-Personal
Cipher: Unknown
Security key: h33K3*d2
Cost settings
-------------
Cost: Unrestricted
Congested: No
Approaching Data Limit: No
Over Data Limit: No
Roaming: No
Cost Source: Default

The saved Wi-Fi password is specified in the Security key field.

Windows saves Wi-Fi network profiles to the %ProgramData%\Microsoft\Wlansvc\Profiles\Interfaces folder.

Display All Saved Wi-Fi Passwords Using PowerShell

Using PowerShell, you can display the list of all saved network SSIDs and passwords. Here is a PowerShell one-liner to display passwords of all WLAN profiles on Windows 10:

(netsh wlan show profiles) | Select-String "\:(.+)$" | %{$name=$_.Matches.Groups[1].Value.Trim(); $_} | %{(netsh wlan show profile name="$name" key=clear)} | Select-String "Key Content\W+\:(.+)$" | %{$pass=$_.Matches.Groups[1].Value.Trim(); $_} | %{[PSCustomObject]@{ PROFILE_NAME=$name;PASSWORD=$pass }} | Format-Table –Wrap

Dump all Wi-Fi passwords on Windows 10 with PowerShell

To dump all Wi-Fi passwords of WLAN profiles to a text file on your desktop, add a pipe to the end of the previous command:

| Format-Table -AutoSize | Out-File $env:USERPROFILE\Desktop\SavedWiFiPass.txt

How to Export and Import WLAN Profiles on Windows 10?

You can export any saved WLAN profile settings along with the Wi-Fi network security key to an XML file and then import it to another computer.

To export a WLAN profile, this command is used:

netsh wlan export profile name="Xiaomi_10D1" key=clear folder=C:\PS

Or you can export all saved wireless profiles (a separate XML file is created for each profile with a network SSID as its name):

netsh wlan export profile key=clear folder=C:\PS

Export WiFi Profiles using NetSh Wlan

Then you can copy the XML files with configured wireless profiles to another Windows device (or deploy files using GPO) and import saved WLAN profiles for all computer users using the command below:

netsh wlan add profile filename=" "C:\PS\home-Xiaomi_10D1.xml" user=all

Or you can import a saved Wi-Fi network to the current user only:

netsh wlan add profile filename=" "C:\PS\home-Xiaomi_10D1.xml" user=current

Now, if any of the imported Wi-Fi networks is within range of the computer’s wireless adapter, Windows will automatically connect to it.

How to Forger a Saved Wi-Fi Network on Windows 10?

You can delete a saved Wi-Fi network with its password in Windows settings. Open Settings -> Network & Internet -> Wi-Fi -> Manage known networks.

windows 10 control panel manage known wifi networks

You will see the list of saved wireless profiles of the networks used earlier. Select the SSID of the network you want to delete and click Forget.

How to forget wireless networks on Windows 10

You can also remove (forget) a saved Wi-Fi network from the command prompt using the netsh. Specify the name of the WLAN profile you want to remove, for example:

netsh wlan delete profile name=”Rt2253”
netsh wlan delete profile - remove saved wi-fi profile

Profile "Rt2253" is deleted from interface "Wireless network".

If you want to delete all saved Wi-Fi networs at once, run the following command:

netsh wlan delete profile name=*

0 comment
3
Facebook Twitter Google + Pinterest
previous post
Using Windows Defender Antivirus on Windows Server 2019 and 2016
next post
Configuring Routing on Linux (RHEL/CentOS)

Related Reading

Using Previous Command History in PowerShell Console

January 31, 2023

How to Install the PowerShell Active Directory Module...

January 31, 2023

Enable Internet Explorer (IE) Compatibility Mode in Microsoft...

January 27, 2023

Finding Duplicate E-mail (SMTP) Addresses in Exchange

January 27, 2023

How to Disable or Uninstall Internet Explorer (IE)...

January 26, 2023

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMWare
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • Using Previous Command History in PowerShell Console

    January 31, 2023
  • How to Install the PowerShell Active Directory Module and Manage AD?

    January 31, 2023
  • Finding Duplicate E-mail (SMTP) Addresses in Exchange

    January 27, 2023
  • How to Delete Old User Profiles in Windows?

    January 25, 2023
  • How to Install Free VMware Hypervisor (ESXi)?

    January 24, 2023
  • How to Enable TLS 1.2 on Windows?

    January 18, 2023
  • Allow or Prevent Non-Admin Users from Reboot/Shutdown Windows

    January 17, 2023
  • Fix: Can’t Extend Volume in Windows

    January 12, 2023
  • Wi-Fi (Internet) Disconnects After Sleep or Hibernation on Windows 10/11

    January 11, 2023
  • Adding Trusted Root Certificates on Linux

    January 9, 2023

Follow us

woshub.com
  • Facebook
  • Twitter
  • RSS
Popular Posts
  • Configuring Port Forwarding in Windows
  • Installing RSAT Administration Tools on Windows 10 and 11
  • Manage Windows Updates with PSWindowsUpdate PowerShell Module
  • Start Menu or Taskbar Search Not Working in Windows 10/11
  • Get-ADUser: Find Active Directory User Info with PowerShell
  • How to Hide Installed Programs in Windows 10 and 11?
  • Adding Drivers into VMWare ESXi Installation Image
Footer Logo

@2014 - 2023 - Windows OS Hub. All about operating systems for sysadmins


Back To Top