Hello All,
I am trying to decrypt a string to plain text using an example I found on
/\/\o\/\/'s blog which referenced a post in the news group. I'm doing it like
this:

$strString = convertto-securestring $strString -securekey $strServerKey
$ptrPassword =
[System.Runtime.InteropServices.marshal]::SecureStringToBSTR($strString)

$strString =
[System.Runtime.InteropServices.marshal]::PtrToStringAuto($ptrPassword)
[System.Runtime.InteropServices.marshal]::ZeroFreeBSTR($ptrPassword)

The intention is that $strString contains the plain text of the string.
(Actually, I don't need this in plain text I just need the securestring to be
correct.) When I do this on the computer I originally encrypted the string
on, it works fine. when I switch computers, the first several characters are
garbage. (They come up as question marks, and they can't be cast as a byte).
I originally encryted the string thusly:
$out = "What is the new password?"
$return = read-host $out -assecurestring
$secure = convertfrom-securestring $return -securekey $strServerKey

I note that there doesn't seem to be a key option in read-host. Can anyone
help me determine the problem here. I've been working on this for days with
no result.
Thanks,
Richard