Skip to content

Instantly share code, notes, and snippets.

@manualbashing
Created March 5, 2020 15:54
Show Gist options
  • Select an option

  • Save manualbashing/a9797ee6a533957f677b7c5f743e7bf5 to your computer and use it in GitHub Desktop.

Select an option

Save manualbashing/a9797ee6a533957f677b7c5f743e7bf5 to your computer and use it in GitHub Desktop.
Clear Text Password from Secure String
$BSTR = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($secString)
$ClearTextPassword = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($BSTR)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment