﻿---
title: stack kb security-endpoint-management-api endpoint-execute-action cli command
description: Run a command Behaviour flags: --dry-run — validate all inputs and exit without performing any action 
url: https://docs-v3-preview.elastic.dev/elastic/cli/pull/458/cli/stack/kb/security-endpoint-management-api/endpoint-execute-action
---

# stack kb security-endpoint-management-api endpoint-execute-action cli command
<cli-modifiers>
</cli-modifiers>

```bash
elastic stack kb security-endpoint-management-api endpoint-execute-action \
  --endpoint-ids <endpoint-ids> \
  --parameters <parameters> \
  [options]
```

Run a command
**Behaviour flags:**
`--dry-run` — validate all inputs and exit without performing any action

## Options

<definitions>
  <definition term="--endpoint-ids string[] required">
    List of endpoint IDs (cannot contain empty strings). Max of 250.
  </definition>
  <definition term="--parameters string required">
  </definition>
  <definition term="--agent-type string">
    List of agent types to retrieve. Defaults to `endpoint`.
  </definition>
  <definition term="--alert-ids string[]">
    If this action is associated with any alerts, they can be specified here. The action will be logged in any cases associated with the specified alerts. Max of 50.
  </definition>
  <definition term="--case-ids string[]">
    The IDs of cases where the action taken will be logged. Max of 50.
  </definition>
  <definition term="--comment string">
    Optional comment
  </definition>
  <definition term="--input-file string">
    path to a JSON file to use as command input
  </definition>
  <definition term="--[no-]dry-run">
    validate all inputs and exit without performing any action (preview changes without applying them)
  </definition>
</definitions>


## Global Options

<definitions>
  <definition term="--[no-]json">
    output as JSON
  </definition>
</definitions>