How to Retrieve WiFi Password on Windows
Remembering the WiFi password when on a guest network is never easy. Even worse is when it's no longer posted and someone else is asking you for it. Luckily there's a built in Windows command to recover the password of a given WiFi network.
The Shell Code
Open cmd
and execute the following command:
netsh wlan show profile name="David Walsh's Network" key=clear
The result of the command, assuming the network is found, is a long text output with a variety of information about the network. To get the see the password for the network, look under the "Security settings" heading which will look like this:
Security settings ----------------- Authentication : WPA2-Personal Cipher : CCMP Authentication : WPA2-Personal Cipher : GCMP Security key : Present Key Content : **THE_PLAIN_TEXT_PASSWORD**
As with any complicated command line format, it's best to create an alias so that you don't need to remember the full string!