export all saved wifi passwords in Windows 11

How to Export all Saved Wi-Fi Passwords in Windows 11?

We all know that Windows will automatically save the Wi-Fi passwords So that you can automatically reconnect to a Known network without entering the password again. This makes it very convenient to connect to known networks that you frequently use. When you connect to any new Wi-Fi network, windows will prompt for a username and password, once you enter the username and password, windows will save the password and remember it when you reconnect to the same network. The Password stored in the Windows Registry or in the wifi profiles, without administrator access it is very difficult to access them. But Windows gives you the option to view the saved Wi-Fi passwords, Find more about how to view the saved Wi-Fi passwords of Known networks. In this article, I have shown you the method to Export all saved wi-fi passwords of known networks using PowerShell.

Export all Saved Wi-Fi Password in Windows 11:

Using PowerShell you can view all the saved Wi-Fi Passwords of Known networks, and with little modification of the script you can export the Saved Wi-Fi Passwords.

Open PowerShell in elevated mode, click on the Start menu and search for PowerShell, right-click on PowerShell app and choose Run as Administrator.

Copy-paste the following script to the PowerShell window.

(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 -AutoSize
Export all Saved Wi-Fi Passwords

This script will display all Known Wifi network names and Passwords.

To export the Wi-Fi passwords to the text file use the following script.

Open Notepad and copy-paste the following script in the Notepad and save it as ExportWifi.ps1

$filePath = "C:\path\to\export\folder\WiFi_Passwords.txt"
(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 -AutoSize | Out-File $filePath

In this script you have to modify the filepath variable, you have to replace the $filepath variable with the actual path where you want to save the file.

Right-click on the script and choose Run with PowerShell, this script will create the text file in the mentioned path and the text file contains the Wifi Name and the Password.

Read Also:

How to Delete or Forget Wifi Network Profile in Windows 10?

Fix iPhone Hotspot Not connecting to Windows 10?

Generate a WiFi History or WlanReport in Windows 10.

How to Check if your PC supports Wi-Fi 6 in Windows 11?

Leave a Comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top