That article really helped me out, thank you.
$SecureStringAsPlainText = $SecurePassword = ConvertFrom-SecureString
$SecureStringAsPlainText = $SecurePassword | ConvertFrom-SecureString
so that the previously-stored $SecurePassword is passed in, rather than provided via prompt
$SecureString = $SecureStringAsPlainText | ConvertTo-SecureString
Decrypting the string only works from the same computer AND same account which encrypted the string. Otherwise I get the following error:
"convertto-securestring : Key not valid for use in specified state."
Is there a way around this so the string can be decrypted on a different computer with the same account?
Below script will be handy for encrypting passwords via power-shell