Retrieve masked password in powershell
jamiet Apr 24th, 2014 1,373 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- $response = Read-host "What's your password?" -AsSecureString
- $password = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR($response))
RAW Paste Data