Cmd#

Executes a specified cmd command. This is equivalent to running cmd /c "<command>".

Required Parameters#


Paramater

Description

Type

command

Specifies the command to be run.

string

Optional Parameters#


Paramater

Description

Type

Default

exeDir

Creates the cmd instance with the Playbook executables folder as its working directory.

bool

false

runas

Specifies what user the process should be run as.

Enum:
currentUser
currentUserElevated
system
trustedInstaller

trustedInstaller

timeout

Specifies a timeout for the command, where it will kill the process and report an error if the timeout is reached.

integer

None

wait

Specifies whether or not to wait for the cmd instance to exit.

bool

false

handleExitCodes

Allows control over how specified exit codes should be handled.

Handlers can be specified like so: handleExitCodes: {1: log, 2: error, 3: halt, -1: retry}

Any of the following handlers can be used:
log - create a log entry
error - throw an error
halt - halt the Playbook
retry - re-run the action
retryError - re-run the action up to 5 times and throw an error if the exit code never changes

You can also use conditional expressions like in the following example: handleExitCodes: {'!0': log, '>=1': show}.

dictionary

None