r/PowerShell • • Jan 03 '19

Create a Portable Encrypted Password

By portable, we mean you can generate the encrypted password in PowerShell on one computer and use it on other computers with different user accounts, not just the computer it was created on.

Get The Code

0 Upvotes

2 comments sorted by

View all comments

2

u/h_ase Jan 03 '19

Thanks for sharing. Very Useful.

There is one little problem in the line where you convert that passwort to a secure string.

$Password = "@#$EjKiu3240-73" | ConvertTo-SecureString -AsPlainText -Force
# should be 
$Password = '@#$EjKiu3240-73' | ConvertTo-SecureString -AsPlainText -Force

Or it will interpret the $EjKiu3240 part as a variable