> ## 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 On Batch Session

Batch executes a RTR active-responder command across the hosts mapped
to the given batch ID.

The following permission is required to run this action:

* `Real Time Response`: **Write** access OR **RTR Active Responder** role.

<Note>
  External Documentation

  To learn more, visit the [CrowdStrike documentation](https://falcon.us-2.crowdstrike.com/documentation/page/f00d6af5/real-time-response-apis#e2e7d467).
</Note>

## Parameters

<div className="integrations-table">
  | Parameter      | Description                                                                                                                                                                                                                                                                  |
  | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | Base Command   | Active-Responder command type we are going to execute, for example: `get` or `cp`.<br />Refer to the [RTR documentation](https://falcon.us-2.crowdstrike.com/documentation/71/real-time-response-and-network-containment#rtr-additional-info) for the full list of commands. |
  | Batch ID       | The ID of the batch to run the command on. You can find the batch ID in the response of the `Create Batch Session` action.                                                                                                                                                   |
  | Command String | Command's input. For example `get some_file.txt`.                                                                                                                                                                                                                            |
</div>

## Example Output

```json theme={"dark"}
{
	"meta": {
		"query_time": 2,
		"powered_by": "<string>",
		"trace_id": "<string>"
	},
	"combined": {
		"resources": {
			"9be1424f2c8545f39d8bc28896a0cc75": {
				"session_id": "<string>",
				"complete": false,
				"stdout": "<string>",
				"stderr": "<string>",
				"aid": "<string>",
				"errors": [
					{
						"code": 68638,
						"message": "<string>"
					}
				],
				"query_time": 2,
				"offline_queued": false
			}
		}
	},
	"errors": []
}
```

## Workflow Library Example

[Run Command on Batch Session with Crowdstrike and Send Results Via Email](https://library.blinkops.com/workflows/run-command-on-batch-session-with-crowdstrike-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-on-batch-session-with-crowdstrike-and-send-results-via-email/canvas" />
</div>
