See Wireless Network Security Key Password in Windows 10  

Page 1 of 2 12 LastLast
    See Wireless Network Security Key Password in Windows 10

    See Wireless Network Security Key Password in Windows 10

    How to See Your Wireless Network Security Key Password in Windows 10
    Published by Category: Network & Sharing
    31 Jan 2020
    Designer Media Ltd

    How to See Your Wireless Network Security Key Password in Windows 10


    When you connect to a new wireless network, Windows will create a profile for the wireless network. A wireless (Wi-Fi) network profile contains the SSID (network name), password key, and security information to be able to connect to a wireless network.

    A wireless network security key is the password required to be able to connect your PC to a secured access point (ex: router) on a wireless network.

    This tutorial will show you different ways on how to find the security key password of your wireless network connection in Windows 10.


    Contents

    • Option One: To Find All Wireless Network Security Key Passwords in PowerShell
    • Option Two: To Find Wireless Network Security Key Password in Command Prompt
    • Option Three: To Find Wireless Network Security Key Password in Wireless Network Properties
    • Option Four: To Find Wireless Network Security Key Password in Wireless Router






    OPTION ONE

    To Find All Wireless Network Security Key Passwords in PowerShell


    1 Open PowerShell.

    2 Copy and paste the command below you want to use into PowerShell, and press Enter.

    (outputs inside PowerShell)
    (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

    OR

    (outputs to text file on your desktop)
    (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 | Out-File "$env:userprofile\Desktop\WirelessNetworkPasswords.txt"

    3 You will now see a list of all your wireless network profiles with their SSID name and password. (see screenshots below)

    See Wireless Network Security Key Password in Windows 10-wireless_password_powershell.png
    See Wireless Network Security Key Password in Windows 10-wireless_network_passwords_txt_file.png






    OPTION TWO

    To Find Wireless Network Security Key Password in Command Prompt


    1 Open a command prompt.

    2 Type thenetsh wlan show profiles command into the command prompt, and press Enter.

    3 You will now see a list of all wireless network profiles on each interface on your PC. Make note of the wireless profile SSID name you want to see the password (security key) of. (see screenshot below)

    See Wireless Network Security Key Password in Windows 10-wi-fi_security_key_command-1.png

    4 Type the command below into the command prompt, and press Enter.

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

    Substitute SSID in the command above with the actual wireless network profile SSID name.

    For example: netsh wlan show profile name="Brink-Router2" key=clear

    5 You will see this wireless network's security key to the right of Key Content under the Security settings section. (see screenshot below)

    See Wireless Network Security Key Password in Windows 10-wi-fi_security_key_command-2.png






    OPTION THREE

    To Find Wireless Network Security Key Password in Wireless Network Properties


    1 Open the Win+X Quick Link menu, and click/tap on Network Connections.

    2 Click/tap on the wireless network connection (ex: Brink-Router2). (see screenshot below)

    See Wireless Network Security Key Password in Windows 10-wi-fi_security_key-1.png

    3 Click/tap on the Wireless Properties button. (see screenshot below)

    See Wireless Network Security Key Password in Windows 10-wi-fi_security_key-2.png

    4 Click/tap on the Security tab, and check the Show characters box under Network security key to be able to see it. (see screenshot below)

    See Wireless Network Security Key Password in Windows 10-wi-fi_security_key-3.png






    OPTION FOUR

    To Find Wireless Network Security Key Password in Wireless Router


    Please read the manual for the brand and model of your wireless router for more specific details on how to do the step below since this will vary per router.


    1 Log in to your wireless router, open the Wireless Setup page, and look for the password of the wireless network you want. (see screenshots below)
    Note   Note
    If you have not changed the security key in your router's wireless settings, or have reset your router back to default, then some wireless router manufacturers set a default security key or password which may be on the bottom of your router or in the router’s documentation. Look for the following terms:
    • Passphrase
    • Password
    • Network Key
    • Security Key
    • Wireless Key
    • WPA Key
    • WPA2 Key
    • WEP Key


    See Wireless Network Security Key Password in Windows 10-router_wireless_key.jpg
    See Wireless Network Security Key Password in Windows 10-linksys.png


    That's it,
    Shawn






  1. Posts : 44
    ten 64
       #1

    Thanks Brink ,

    nice Option One we have here
    it will show you the passwords for all wifi connected networks past or present
    without typing their names

    Question : [ in fact is about powershell ]

    is possible to redirect the output of powershell
    to a .txt file ? not existing one or append to an existing .txt file ?
    in same command line of course
    I want to run the command in an autoit script

    c
      My Computer


  2. Posts : 68,894
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #2

    Hello C, :)

    Yes, you sure can using the Out-File command.

    Substitute the part in red at the end of the example command below with the full path and .txt file name you want instead.

    Code:
    (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 }} | Out-File "C:\Users\Brink\Desktop\WirelessNetworkPasswords.txt"


    UPDATE: I have added a text file output option to OPTION ONE to help.
    Last edited by Brink; 28 Sep 2016 at 10:16.
      My Computers


  3. Posts : 1,759
    Windows 10 Pro (+ Windows 10 Home VMs for testing)
       #3

    Brink said:
    Yes, you sure can using the Out-File command.

    UPDATE: I have added a text file output option to OPTION ONE to help.
    This is really good, but I'm finding that some profiles have the SSID or password (or both) truncated and periods added. For example, an SSID of FreeInternet-2G (i.e. 15 characters) is truncated to FreeInter... (i.e. 9 chacterters and 3 periods) and an 11 character password truncated to 7 characters and 3 periods (i.e. only 10 characters).

    This isn't an issue when exporting using netsh wlan export and parsing with AutoHotkey so I'm at a bit of a loss why PowerShell is doing this. Any idea how to prevent the truncation?
      My Computer


  4. Posts : 68,894
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #4

    Hello @RickC, :)

    This is most likely from the output is in a table format causing them to be truncated like that.

    Format-Table

    Please test the PowerShell commands below with the first command using "Format-Table -AutoSize" added and the second command using "Format-Table -Wrap" added to it to see if that may help.

    Code:
    (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 "$env:userprofile\Desktop\WirelessNetworkPasswords.txt"
    Code:
    (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 | Out-File "$env:userprofile\Desktop\WirelessNetworkPasswords.txt"

    EDIT:

    I just tested the original command currently in the tutorial with a SSID of "Brink-Routerxxxxxx", and it didn't get truncated.

    It'll be interesting to hear how the test commands above work for you with the extra formatting parameter added.
    Last edited by Brink; 13 Nov 2016 at 11:31.
      My Computers


  5. Posts : 1,759
    Windows 10 Pro (+ Windows 10 Home VMs for testing)
       #5

    Brink said:
    Please test the PowerShell commands below with the first command using "Format-Table -AutoSize" added and the second command using "Format-Table -Wrap" added to it to see if that may help.

    It'll be interesting to hear how the test commands above work for you with the extra formatting parameter added.
    Hi Brink,

    The addition of "Format-Table -AutoSize" did the trick. :)

    I tried "Format-Table -Wrap" but the output looked awful.

    Many thanks.

    Rick
      My Computer


  6. Posts : 68,894
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #6

    Great news. I'll add "Format-Table -AutoSize" to the tutorial now to help those with the same issue. :)
      My Computers


  7. Posts : 44
    ten 64
       #7

    Brink , maybe you take a look on autoit forum

    I made a topic about wireless passwords
    based on powershell command (Option One here)
    and as result we have available now
    an autoit script with GUI (post #17)
    I can send you the compiled version but I am sure you can handle that.

    at post #11 is another working solution based on command prompt (Option Two here)

    topic is here
    [Solved] Help with PowerShell command - AutoIt General Help and Support - AutoIt Forums

    you can promote the script compiled or not if you wish

    Happy New Year for all community

    c
      My Computer


  8. Posts : 68,894
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #8

    Thank you oneless. I hope you have a Happy New Year as well. :)
      My Computers


  9. Posts : 1,759
    Windows 10 Pro (+ Windows 10 Home VMs for testing)
       #9

    I've done the same (well, similar) using an AutoHotkey wrapper. Have a look at Help for Win10 1607's confusing Wi-Fi settings - Page 2 | Windows Secrets Lounge. Since then I've improved it so it's now at v3.

    Code:
    ; Get stored WiFi profiles and passwords v3
    ; See https://autohotkey.com/boards/viewtopic.php?f=6&t=24202
    ; Thanks to 'garry' in the AHK forum for suggestimg 'FileRead' instead of 'FileReadLine'
    
    #SingleInstance force ; Force only one instance at a time#SingleInstance force
    
    ; Prompt to 'Run as Admin', i.e. show UAC dialog
    If Not A_IsAdmin
    {
       Run *RunAs "%A_ScriptFullPath%"  ; Requires v1.0.92.01+
       ExitApp
    }
    
    ; ***** Housekeeping *****
    SetWorkingDir, %A_ScriptDir%        ; Set script to use the folder it's run from
    FilesDir=%A_ScriptDir%\WifiXMLS     ; Set folder for XML files
    
    IfNotExist,%FilesDir%               ; Check whether folder exists
      FileCreateDir,%FilesDir%          ; ... and create the folder if it doesn't exist
      
    FileDelete, %FilesDir%\*.xml        ; Make sure there are no existing XML files
    IfExist Results.txt                 ; Make sure there is no existing Results.txt file
        FileDelete, Results.txt    
    
    FileAppend, Stored WiFi passwords are as follows:`n`n, Results.txt ; Create first line of new Results.txt file
    
    ; ***** Export profiles *****
    RunWait, %comspec% /c "netsh wlan export profile folder=%FilesDir% key=clear",, hide  ; Exports all WiFi profiles
    
    ; ***** Loop through/parse generated files *****
    
    FileList =  ; Initialize to be blank
    Loop, %FilesDir%\*.xml ; Loop through the XML files
        FileList = %FileList%%A_LoopFileName%`n ; Generate a filelist
    Sort, FileList, ; Sort the filelist alphabetically
    
    Loop, %FilesDir%\*.xml              ; Loop through each file
    {
      string:=""                        ; Store contents of file in variable
      xmlfile:=A_LoopFileFullPath       ; With each file, with its path
      FileRead, string, %xmlfile%       ; ... read each file into memory
      Loop, parse, string, `n, `r       ; Parse each line using LineFeed (`n) and Carriage Return (`r)
       {
       lines:= A_LoopField  `           ; Store lines in variable
       if lines contains <name>         ; Check lines for 1st criteria
          {
          L%a_index%:=RegExReplace( lines, "<.*?>" )
          ssid:= % L%a_index%           ; Store search result in variable
          }
           
       if lines contains <authentication>   ; Check lines for 2nd criteria
          {
          L%a_index%:=RegExReplace( lines, "<.*?>" )
          auth:= % L%a_index%           ; Store search result in variable
          }
    
       if lines contains <encryption>   ; Check lines for 3rd criteria
           {
           L%a_index%:=RegExReplace( lines, "<.*?>" )
           crypt:= % L%a_index%         ; Store search result in variable
           }
    
       if lines contains <keyMaterial>  ; Check lines for 4th criteria
          {
          L%a_index%:=RegExReplace( lines, "<.*?>" )
          password:= % L%a_index%       ; Store search result in variable
          
          ssid=%ssid%                   ; Keep just the data between <name> and </name>
          auth=%auth%                   ; Keep just the data between <authentication> and </authentication>
          crypt=%crypt%                 ; Keep just the data between <encryption> and </encryption>
          password=%password%           ; Keep just the data between <keyMaterial> and </keyMaterial>
           
          resultbasic .= "XML profile:"A_Tab . xmlfile . "`nSSID:"A_Tab A_Tab . ssid "`nPassword:"A_Tab . password . "`n---------------------------------------------`n"
          resultverbose .= "XML profile:"A_Tab . xmlfile . "`nSSID:"A_Tab A_Tab . ssid "`nPassword:"A_Tab . password . "`nAuthentication:"A_Tab . auth . "`nEncryption:"A_Tab . crypt . "`n---------------------------------------------`n"
          ; Break                         ; Used for testing
          }
       }
    }
    
    ; ***** Display a message box, with custom button names, offering a choice of info *****
    SetTimer, ChangeButtonNames, 50 
    MsgBox, 36, WiFi Profile Info, What info would you like?`n`nBasic, i.e. show just passwords`nVerbose, i.e. show passwords and security`n`nChoose a button...
    
    IfMsgBox, YES 
       {
       FileAppend, %resultbasic%, results.txt   ; Write the basic results to the text file
       FileAppend, `nNote: Only wireless access points with passwords are listed above.`n, Results.txt ; Create last line of new Results.txt file
       Run, results.txt                    ; Open the file in whatever app is registered to display text files
       ExitApp         ; Exit the script
       }
    else 
       {
       FileAppend, %resultverbose%, results.txt   ; Write the verbose results to the text file
       FileAppend, `nNote: Only wireless access points with passwords are listed above.`n, Results.txt ; Create last line of new Results.txt file
       Run, results.txt                    ; Open the file in whatever app is registered to display text files
       ExitApp         ; Exit the script
       }
    return 
    
    ChangeButtonNames: 
    IfWinNotExist, WiFi Profile Info
        return  ; Keep waiting.
    SetTimer, ChangeButtonNames, off 
    WinActivate 
    ControlSetText, Button1, &Basic 
    ControlSetText, Button2, &Verbose 
    return
    
    Esc::ExitApp    ; Used to cancel the MsgBox, if needed
    Hope this helps...
    Last edited by RickC; 30 Dec 2016 at 19:19.
      My Computer


 

Tutorial Categories

See Wireless Network Security Key Password in Windows 10 Tutorial Index Network & Sharing Instalation and Upgrade Browsers and Email General Tips Gaming Customization Apps and Features Virtualization BSOD System Security User Accounts Hardware and Drivers Updates and Activation Backup and Restore Performance and Maintenance Mixed Reality Phone


  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 22:42.
Find Us




Windows 10 Forums