Netsh wlan show profile
Then, after seeing the wifi's name on the list, type
Netsh wlan show profile name="hostspot name" key=clear
The password will appear under key content.