I have created a workflow which task is to mainly deploy a new VM from a template and perform sysprep, add more ram (if requested), more cpu (again if requested), more disks etc etc. The workflow has a custom script part generating a random password (string) and the "run program in guest" is then used to call "net user administrator <random pw>" which sets the random password on the deployed VM. An email is then sent to the requestor with information that the VM is deployed and what password was assigned. The workflow works as a charm.
But now I need to run another "run program in guest" workflow (the last task of the workflow), but this is not working as the deployed VM no longer has the default template password. I have to supply this workflow with the new random password which was created - but this is not working either, because the "run program in guest" workflow requires password as securestring, but my random password is generated in string-format (obviously as It has to be set with "net user" and readable in email. And I can't bind this stringvariable to the securestring input as a quick workaround using visible binding.....
The solution would be an easy scriptable task with the vmRandomPassword as input, and vmSecureRandomPassword as output and then a scriptcode converting input string to output securestring.... But I can't get this to work, and everything I google seem to be powershell - but I can't use powershell syntax in vCO either....
Anyone?