Place Data on Orchestrator Data Bus from PowerShell
Publish PowerShell variables to the System Center Orchestrator databus.
October 8, 2013
Q: How can I place data on the System Center Orchestrator data bus from a Windows PowerShell script within Orchestrator?
A: Most built-in activities in Orchestrator automatically publish data to the data bus that can be used by subsequent activities. However, PowerShell scripts running in a Run .Net Script activity don't automatically publish any variables created within the PowerShell. To publish variable content to the data bus from a PowerShell script, the Run .Net Script activity has to be configured to publish specific variables to the databus.
Open the properties of the Run .Net Script activity.
Select the Published Data tab.
Click the Add... button.
In the Name field, enter a name for the variable to be used on the data bus. In the Type, select the type of the data (e.g., String) and in the Variable name enter the name of the variable defined within the PowerShell script-- but do NOT type the leading $ of the variable. It's very common to use the same name on the data bus for the variable as the variable within the PowerShell. Click OK.
Click OK to the properties.
About the Author
You May Also Like