Discover Wi-Fi Password for Existing Profile
If you have already connected to a Wi-Fi network previously then a profile for that network is created in Windows. To see the existing Wi-Fi profiles open a Command prompt and run as administrator.
Now enter the command netsh wlan show profiles
A list of Wi-Fi profiles will be produced like below.
Now pick the profile that you want to get the passcode for and then enter this command to retrieve the passcode.
netsh wlan show profile name="<Name of Wi-Fi Profile>" key=clear
The output will have a field called "Key Content"
And this is the password for that Wi-Fi profile.