Skip to content

Instantly share code, notes, and snippets.

@gowon
Last active May 18, 2019 05:15
Show Gist options
  • Save gowon/3baa3f61a6f28232f7c3a331233e5c2f to your computer and use it in GitHub Desktop.
Save gowon/3baa3f61a6f28232f7c3a331233e5c2f to your computer and use it in GitHub Desktop.
Windows 10 get network password

Open command prompt, and run it as an administrator. Then, type the following command:

netsh wlan show profile

This command will list every Wi-Fi profile that you’ve ever connected to. To reveal the password of a specific network, type the following command, substituting “NETWORK NAME” with the Wi-Fi network you’re looking up:

netsh wlan show profile “NETWORK NAME” key=clear

Copying and pasting the following command will iterate through all secure networks and reveal the password:

iex ((New-Object System.Net.WebClient).DownloadString('https://gist.githubusercontent.com/gowon/3baa3f61a6f28232f7c3a331233e5c2f/raw/dec37db261dbb8823fe243ea3dc01d76ca971172/get-wifi-password.ps1'))

Based on https://www.itechtics.com/find-wifi-password/

(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]@{ SSID=$name;SECURITY_KEY=$pass }} | Format-Table -AutoSize
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment