A question came up today on the newsgroup asking why the following didn’t work:
PS >$secureString = ConvertTo-SecureString "Hello"
ConvertTo-SecureString : Cannot process argument because the value of argume
nt "input" is invalid. Change the value of the "input" argument and run the
operation again.
At line:1 char:39
+ $secureString = ConvertTo-SecureString <<<< "Hello"
PS >
For some background – a SecureString is a type of string that PowerShell (and .Net) keeps encrypted in memory. Even if an attacker can explore the memory on your computer (like the contents of a swap file, for example,) they cannot gain access to the secret protected by the SecureString.

