daily pastebin goal
13%
SHARE
TWEET

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!
  1. $response = Read-host "What's your password?" -AsSecureString
  2. $password = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR($response))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top