Error during save: Cannot have ']]>' inside an XML CDATA block.
The code snippet is:
PowerShell Code
Double-click the code block to select all.$rbParamString = "" if ($rbParameters -ne $null) { # Format the param string from the Parameters hashtable $rbParamString = "<d:Parameters><![CDATA[<Data>" foreach ($p in $rbParameters.GetEnumerator()) { #$rbParamString = -join ($rbParamString,"<Parameter><ID>{",$p.key,"}</ID><Value>",$p.value,"</Value></Parameter>") $rbParamString = -join ($rbParamString,"<Parameter><ID>{",$p.key,"}</ID><Value>",$p.value,"</Value></Parameter>") } $rbParamString += "</Data>]]></d:Parameters>" } "@I am using the MSDN code to trigger an Orchestrator Runbook with PowerShell: http://msdn.microsoft.com/en-us/library/hh921685.aspx
I am able to run the same code from a .ps1 script with PowerShell studio. So my current workaround is that I have a seperate .ps1 script that is called by the Form to run the needed code. Of course, I would prefer to have the entire code in the form.