Hi,
Sorry role not shared anywhere right now. Keep meaning to put stuff on galaxy but haven't found the time.
My apologies, looking at the code I'd forgotten that I'd tweaked the powershell script so I could pass in plaintext password. I doubt a SecureString would be serializable.
I think the only bit I changed was at the start of the process section. Instead of this
process
{
try
{
$ErrorActionPreference
=
"Stop"
$decryptedPass
=
[Runtime.InteropServices.Marshal]
::PtrToStringAuto(
[Runtime.InteropServices.Marshal]
::SecureStringToBSTR(
$Password
)
)
I have this
process
{
try
{
$ErrorActionPreference
=
"Stop"
$secPass = ConvertTo-SecureString -String $Password -AsPlainText -Force
$decryptedPass
=
[Runtime.InteropServices.Marshal]
::PtrToStringAuto(
# [Runtime.InteropServices.Marshal]
::SecureStringToBSTR(
$Password
)
[Runtime.InteropServices.Marshal]
::SecureStringToBSTR(
$secPass
)
)
Hope that helps,
Jon