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'))