Repository navigation
Execute Action
Preview a discovered task, diagnostic or recovery on its target. A confirmed call can run it under the connected SCOM account. Preview an alert action
The host exposes this tool with --enable-writes. The connected SCOM account must also have permission to run the action. Host options
| Argument | Required or default | Meaning |
|---|---|---|
actionKind |
Required |
task, diagnostic or recovery. |
actionId |
Required | Action GUID from scom_get_alert_actions. |
objectId |
Required | Target GUID from actions.alert.source.id. |
parameters |
Optional for tasks | Object mapping exact declared parameter names to string values. |
confirm |
Preview | Set to true only after the operator approves the exact preview. |
previewToken |
Required to confirm | Copy preview.previewToken from the approved preview. |
stateChangeEventId |
Required to confirm a diagnostic or recovery | Copy preview.stateChangeEvent.id. |
runId |
Optional lookup | Read a previous run by GUID with the same action kind, action ID and object ID. |
{"name":"scom_execute_action","arguments":{"actionKind":"task","actionId":"11111111-1111-4111-8111-111111111111","objectId":"22222222-2222-4222-8222-222222222222"}}Review the action, target, parameters, warnings and any monitor and state change. The preview expires after 15 minutes. If inputs change or the token expires, obtain approval for a fresh preview. Diagnostics require full visibility of recovery definitions. Hidden tasks, diagnostics with linked recoveries, chained or resetting recoveries, health resets and recalculation are ineligible.
If run.state is stillRunning, look up run.runId. If it is submissionUnknown, SCOM may already have started the action. Repeating the confirmation risks a duplicate run. Check for a recent run with the same inputs and confirm and previewToken omitted. If the result is inconclusive, verify in Task Status or Health Explorer.