stack kb elastic-agent-actions post-fleet-agents-bulk-unenroll cli command
Auth required
elastic stack kb elastic-agent-actions post-fleet-agents-bulk-unenroll \
--agents <agents> \
[options]
Bulk unenroll agents
--agentsstringrequired-
Repeatable: pass
--agentsmultiple times to supply more than one value --batch-sizenumber--dry-run--force- Also unenrolls agents that are enrolled in hosted agent policies or are managed agents. Does not revoke API keys immediately. To do so, also set
revoke. --include-inactive- When passing agents by KQL query, unenrolls inactive agents too
--revoke- Immediately invalidates the API keys of the agents without notifying them. The agents keep running and can still send data to outputs not covered by the invalidated keys, such as Kafka and Logstash. Remote Elasticsearch keys are invalidated by Fleet Server on a best-effort basis. This action cannot be undone. Use it only for offline or compromised agents.
--input-filestring- path to a JSON file to use as command input
--no-validate- skip input validation and send the request as-is
--output-fieldsstring- comma-separated list of fields to include in output (dot-notation supported)
--output-templatestring- Mustache-like template for custom text output (e.g. "{{id}}: {{name}}")
--json-
output as JSON