> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blinkops.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Run Command

Run an Active Response command on all agents or a list of them.

<Note>
  External Documentation

  To learn more, visit the [Wazuh Server documentation](https://documentation.wazuh.com/current/user-manual/api/reference.html#tag/Active-response).
</Note>

## Basic Parameters

<div className="integrations-table">
  | Parameter         | Description                                                                                                                                      |
  | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
  | Agent IDs         | A comma-separated list, without any whitespace before or after the commas, of agent IDs. All agents are selected by default.                     |
  | Arguments         | A comma-separated list, without any whitespace before or after the commas, of command arguments.                                                 |
  | Command           | The command running in the agent.<br /><br />**Note:** If this value starts with `!`, then it refers to a script name instead of a command name. |
  | Pretty            | Select to show results in human-readable format.                                                                                                 |
  | Wait For Complete | Select to disable timeout response.                                                                                                              |
</div>

## Advanced Parameters

<div className="integrations-table">
  | Parameter  | Description                                                   |
  | ---------- | ------------------------------------------------------------- |
  | Alert Data | Alert data depending on the active response command executed. |
</div>

## Example Output

```json theme={"dark"}
{
	"data": {
		"affected_items": [
			"001",
			"002"
		],
		"total_affected_items": 2,
		"total_failed_items": 0,
		"failed_items": []
	},
	"message": "AR command was sent to all agents",
	"error": 0
}
```

## Workflow Library Example

[Run Command with Wazuh Server and Send Results Via Email](https://library.blinkops.com/workflows/run-command-with-wazuh-server-and-send-results-via-email)

<div className="iframe-wrapper">
  <div className="iframe-media">
    <img src="https://mintcdn.com/blinkops-2/ojHYuDeYX5FWuN8a/img/Icons/play-box.svg?fit=max&auto=format&n=ojHYuDeYX5FWuN8a&q=85&s=b8af968e71438a9499c3223c9bd29fb2" alt="Workflow Library" width="16" height="16" data-path="img/Icons/play-box.svg" />

    Preview this Workflow on desktop
  </div>

  <iframe className="iframe" src="https://library.blinkops.com/workflows/run-command-with-wazuh-server-and-send-results-via-email/canvas" />
</div>
