Encryption:
·
PS C:\> read-host
-assecurestring | convertfrom-securestring | out-file C:\cred.txt
Decryption:
·
$PlainTextPassword=
[Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR(
(ConvertTo-SecureString $credential.Password) ))
No comments :
Post a Comment