vRO Workflow that accepts input into Powershell

Having difficulty creating a workflow that accepts input and passes that into a variable that is contained in a script.  I am still new with vRO. 

1.  I copied the workflow "Invoke an Internal PowerShell Script"

2.  Hard coded the PowerShell Host as an Attribute

3.  Hard coded the parameter "script" as an Attribute

4.  I have 1 input.  That input is bound to a "variable"  lets call it $Scriptinput.  In the script I am looking to call $Scriptinput. 

How do I pass the $Input from vRO into the Powershell script?




0 Kudos
2 Replies
Hot Shot
Hot Shot

So if the script is a string, you can search in it for $Scriptinput. and replace it with your input.

Is is ok for you or not?

PS. I can see that you point ScriptInput to script in citrixMessage part. Are you sure that it shouldn't be like that:

- script is a script

- input is variable

- you take a input and replace variable $Scriptinput with your input

- pass script with replaced variable to citrixMessage part

0 Kudos
Hot Shot
Hot Shot

Is your powershell script defined inline and you execute the script with the plug-in? Or is your powershell script a .ps1 file sitting on the host and you're executing an external script using the plug-in?

The approach for either is different.

For inline script you would find and replace a placeholder in the script with your script input. For an external script you would pass your scriptInput as a parameter to the script you are calling; this approach also works if you want to preserve your inline script as pure powershell without placeholders.

Of course you've given no indication what kind of value you're expecting for your scriptInput variable; it could be another whole script!

0 Kudos