Generating
Actions
You can run
workflows to generate actions based on a
PowerShell
script or a
PowerShell
cmdlet. You can use the generated actions as building blocks for custom
workflows.
Generate an action from a PowerShell script
PowerShell
scriptYou can run a
workflow to generate an action from a
PowerShell
script that you provide. You can optionally generate a sample workflow that can
run the generated action.
- Verify that you are logged in to theAutomation OrchestratorClient as an administrator.
- Verify that you have a connection to a PowerShell host from theInventoryview.
You can customize the script
of the action that you generate by using placeholders. For each placeholder,
the workflow creates a corresponding action parameter of type
string
in the generated action. When you run the action, you can provide an actual
value as the action parameter to replace the placeholder.
- In theAutomation OrchestratorClient, navigate to and enter thepowershellandgeneratetags in the workflow search box.
- Locate theGenerate an action from a PowerShell scriptworkflow and clickRun.
- On theScripttab, in theScripttext box, type or paste thePowerShellscript from which to generate the action.You can use{#ParamName#}as a placeholder for user input. If the placeholder is of typestring, you must use double quotes to pass the value of the placeholder to the action.The following script is an example of how to link the generated action parameter to a script parameter.param($name={#ParamName#}) echo $name;
- On theActiontab, in theNametext box, enter a name for the action that you want to generate, and select an existing module in which to generate the action.
- On theWorkflowtab, select whether to generate a workflow.OptionDescriptionYesGenerates a sample workflow that can run the generated action. You must select a folder in which to generate the workflow.The name of the generated workflow consists of the predefined string Invoke Script and the name of the generated action.NoA sample workflow is not generated.
- ClickSubmitto run the workflow.
You can integrate the
generated action in custom workflows.
Generate an action for a PowerShell Cmdlet
PowerShell
CmdletYou can run a workflow to generate an
action for a
PowerShell
cmdlet and
parameter set that you provide. With this action, you can use PowerShell
functionality in Automation Orchestrator
. You can optionally generate a sample workflow
that runs the generated action. - Verify that you are logged in to theAutomation OrchestratorClient as an administrator.
- Verify that you have a connection to a PowerShell host from theInventoryview.
You can use a large set of data types with the
PowerShell
script engine. The data types that you can use include primitive types such as
Integer
,
Boolean
,
Char
, any type
available from the .NET assembly, or user-defined types. When generating actions
based on PowerShell
cmdlet definitions, the input and output cmdlet parameters are represented by types
that the Automation Orchestrator
platform supports. The PowerShell
plug-in defines the type mappings. In general, primitive types are mapped to the
corresponding Automation Orchestrator
types, and complex types are represented by the
PowerShellRemotePSObject
object. - In theAutomation OrchestratorClient, navigate to and enter thepowershellandgeneratetags in the workflow search box.
- Locate theGenerate an action for a PowerShell cmdletworkflow and clickRun.
- On theCmdlettab, select aPowerShellcmdlet to run when using the action that you generate.
- Select a parameter set for the cmdlet.The parameter set definition values appear in theParameter set definitiontext box.You cannot modify the parameter set definition values by editing the string in theParameter set definitiontext box. You can review the string for information about the parameters that the parameter set contains.
- On theActiontab, in theNametext box, enter a name for the action that you want to generate, and select an existing module in which to generate the action.
- On theWorkflowtab, select whether to generate a workflow.OptionDescriptionYesGenerates a sample workflow that can run the generated action. You must select a folder in which to generate the workflow.The name of the generated workflow consists of the predefined string Execute Cmdlet and the name of the generated action.NoA sample workflow is not generated.
- ClickRun.
You can integrate the
generated action in custom workflows.
Passing Invocation
Results Between Actions
The
PowerShell
plug-in supports passing of results as parameters from one
PowerShell
script invocation to another. To pass results correctly, both invocations must
happen in the same session.