Get-CUActionSignature: Retrieve Action Parameters

Prev Next

You can use the Get-CUActionSignature cmdlet to obtain a list of parameters associated with a particular action. This command is helpful because it allows you to examine an action and determine which parameters can be provided to it in JSON format. The parameters included in the list are

  • Input parameters required by the action

  • Output parameters which return the results of the action

Syntax

Get-CUActionSignature [-ActionId] <string>  [<CommonParameters>]

Input Parameters

The script parameters are defined in an argument array, where each parameter is identified by its index, starting from zero. For example, the first parameter is referred to as arg_0, the second parameter is arg_1, and so on.
Powershell window displaying script parameters defined in an argument array, next to modify script-action parameters window

Input Parameters

Key

Description

agentId

Internal Use. The remote machine to run the action on

arg

Command line argument for the action

creds

Credential set

Output Parameters

Key

Description

executionStatus

Current status of the action execution. Possible values are          

  • Waiting (0)

  • Running (1)

  • Aborted (2)

  • Timeout (3)

  • Success (4)

  • Error (5)

  • ExecutionError (6)

exitCode

Returns the exit code for the action

executionStartTime

Epoch timestamp of the start time

executionEndTime

Epoch timestamp of the end time

stdErr

Shows the error (if thrown by the action)

stdOut

Returns the output as you would see in the script output

Examples

Example 1 - Retrieve the action signature for the Universal EUC Sync Script

One of our most powerful scripts is the Universal EUC Sync Script which requires a couple of input parameters.

  1. Retrieve the actionID:

$availableactions = Get-CUAvailableActions
$actionID = $availableactions | Where-Object {$_.Title -eq 'Universal EUC Sync'} | Select-object Id
  1. Retrieve the action signature:

Get-CUActionSignature -ActionId $actionID.Id

Powershell window displaying Get-CUActionSignature cmdlet output results