YAML for Powershell Command

Powershell Command (POWERSHELL)

YAML parameters for Powershell Command

PARAMETERS
targetsrequiredobject[]
The list of target servers where the PowerShell commands will be executed
typerequiredstring

Value: POWERSHELL

actionrequiredstring
Unique identifier for the action within the pipeline.
run_as_scriptboolean
If set to true, commands will be executed as a PowerShell script
working_directorystring
Directory on the remote server where commands are executed.
commandsstring[]
Shell commands to execute on the remote server.
execute_every_commandboolean
When true, execute all commands even if earlier ones fail.
trigger_timestring enum
Specifies when the action should be executed.
Allowed enum:
ON_EVERY_EXECUTION,
ON_SUCCESS,
ON_FAILURE,
ON_BACK_TO_SUCCESS,
ON_WARNING,
ON_WAIT_FOR_APPROVE,
ON_TERMINATE
loopstring[]
The list of variables for dynamic action execution. The action runs once for each value.
run_only_on_first_failureboolean
Defines whether the action should be executed on each failure. Restricted to and required if the trigger_time is ON_FAILURE.
disabledboolean
When set to true the action is disabled. By default it is set to false.
timeoutinteger
The timeout in seconds.
ignore_errorsboolean
If set to true the execution will proceed, mark action as a warning and jump to the next action. Doesn't apply to deployment actions.
retry_intervalinteger
Delay time between auto retries in seconds.
retry_countinteger
Number of retries if the action fails.
run_nextstring enum
Defines whether the action should run in parallel with the next one.
Allowed enum:
WAIT_ON_SUCCESS,
IN_SOFT_PARALLEL,
IN_HARD_PARALLEL
trigger_conditionsTriggerConditionYaml[]
The list of trigger conditions to meet so that the action can be triggered.
variablesVariableYaml[]
The list of variables you can use in the action.

Last modified on Apr 27, 2026

YAML examples for Powershell Command

PowerShell deploy script with targets

yaml
- action: PowerShell deploy script type: POWERSHELL trigger_time: ON_EVERY_EXECUTION disabled: false working_directory: C:\app commands: - Get-Process - Write-Host 'Deploying application...' - .\deploy.ps1 execute_every_command: true run_as_script: true targets: - target: windows-prod type: SSH name: Windows Production Server host: windows-server.example.com port: "5986" auth: method: PASSWORD username: admin password: secret123 ignore_errors: false retry_interval: 30 retry_count: 2 timeout: 3600

Simple PowerShell command

yaml
- action: PowerShell command type: POWERSHELL trigger_time: ON_EVERY_EXECUTION commands: - Get-Date targets: - "my-ssh-target"

PowerShell with password authentication target

yaml
- action: "PowerShell deploy" type: "POWERSHELL" trigger_time: ON_EVERY_EXECUTION commands: - Get-Date targets: - target: example type: SSH name: example host: 192.0.2.1 port: "22" auth: method: PASSWORD username: deploy_user password: $MyPassword

PowerShell with SSH key authentication target

yaml
- action: "PowerShell deploy" type: "POWERSHELL" trigger_time: ON_EVERY_EXECUTION commands: - Get-Date targets: - target: example type: SSH name: example host: 192.0.2.1 auth: method: SSH_KEY username: deploy_user password: $MyPassword passphrase: $PassPhrase key: $Ssh_Key