To get the password back out in to a usable credential variable like the article, you'd do this. \Clowns.txt # Because who would look inside, right? $EncryptedString = ConvertFrom-SecureString $SecureString $SecureString = Read-Host -Prompt "Enter your Password" -AsSecureString You can copy and paste the following two code blocks to sample it without doing any file checking or further copying and pasting. The article is just an example of how to use it. If you need to use ConvertFrom-SecureString or ConvertTo-SecureString across multiple machines/accounts, which I wouldn't advise, then you would have to specify a key (see the parameters of the functions). This process uses the Windows Data Protection API - DPAPI. You won't be able to decrypt the example string on your machine that easily because Windows uses the local user and machine account to "encrypt" the password.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |