Protecting your Wi-Fi network with a password can safeguard you against security threats and prevent unauthorized use. To set up a password for your Wi-Fi, access the administration or settings page of your router. If you ever forget the password, it's possible to reset it. Additionally, if you're using a Windows PC that already connected to the Wi-Fi, you can easily retrieve the password in just five easy steps.
Click on the Start button located on the taskbar.
Type "View Network Connections" in the search box and click on it to open.
Double-click on the WiFi network adapter to open the WiFi status dialog box. Alternatively you can right-click on the network adapter and select Status.
Click on Wireless Properties button to open Network Properties dialog for that WiFi Network.
Click Security Tab and click Show Characters to see the password.
Show Wi-Fi Password from Command Line
To show Wi-Fi password from command prompt,
Open an elevated Command Prompt.
Click on the Start button and type cmd
Right-Click Command Prompt app from the search results and select Run as Administrator.
Click Yes on the pop-up window to open an elevated command prompt.
Run the following command to show a list of available interfaces.
Netsh wlan show interfaces
The output of this command shows available Wi-Fi interfaces and also the Profile that is connected to that interface.
Run the following command and check for Key Content under Security Settings to see the password.
Netsh wlan show profile name="myWiFiProfile" key=clear
You could also run
Netsh wlan show profiles
to show all the profiles that are configured and then run the command on step 3 to view the password. Consequently you can see the password for any Wi-Fi network that this PC has ever connected to.