> For the complete documentation index, see [llms.txt](https://docs.autopilotmonitor.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.autopilotmonitor.com/reference/agent-command-line.md).

# Agent Command-Line Parameters

In production the agent needs no parameters — the bootstrap script installs and starts it with everything it needs, and behavior is controlled through [tenant settings](/reference/settings.md). The command line exists for **testing, debugging, and advanced scenarios**, launching `AutopilotMonitor.Agent.exe` directly.

## Session & lifecycle

| Parameter               | Description                                                                                                                 |
| ----------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| `--new-session`         | Deletes existing session data and starts a fresh session — restart the agent on a device without carrying over stale state. |
| `--no-cleanup`          | Suppresses self-destruct after enrollment; agent files and the scheduled task remain for post-enrollment debugging.         |
| `--keep-logfile`        | Preserves the log directory during self-destruct.                                                                           |
| `--reboot-on-complete`  | Reboots the device after enrollment completes (default delay 10 s, configurable via remote configuration).                  |
| `--disable-geolocation` | Disables the IP-based geo-location lookup for this run.                                                                     |

## Authentication & bootstrap

| Parameter                              | Description                                                                                                                                             |
| -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--bootstrap-token <token>`            | Authenticate with a [Bootstrap Token](/reference/bootstrap-script-and-tokens.md#bootstrap-tokens) during OOBE, before an MDM client certificate exists. |
| `--await-enrollment`                   | Wait for the MDM client certificate to become available before monitoring starts.                                                                       |
| `--await-enrollment-timeout <minutes>` | Maximum wait for the MDM certificate. Default: `480` (8 hours).                                                                                         |

## Testing & replay

| Parameter                   | Description                                                                                                                                                                                                                                                                      |
| --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--ime-log-path <path>`     | Use IME log files from a custom path — test with logs collected from other devices.                                                                                                                                                                                              |
| `--replay-log-dir <path>`   | **Replay** real IME logs from a directory, simulating a complete enrollment in fast-forward. Creates a real session in the backend: device info comes from the current machine, enrollment events from the logs. Ideal for testing rules, demos, and analyzing past enrollments. |
| `--replay-speed-factor <n>` | Time compression for replay. Default `50` — a 50-minute enrollment replays in about a minute. Delays between events are divided by the factor, capped at 5 s each.                                                                                                               |

### Example — replay a captured enrollment

```powershell
AutopilotMonitor.Agent.exe --replay-log-dir "C:\Logs\IME" --replay-speed-factor 100
```

Replays the captured enrollment at 100× speed and produces a full session on the dashboard — including [analyze rule](/rules/analyze-rules.md) evaluation, which makes replay the fastest way to test a custom rule.

{% hint style="warning" %}
Replay and test parameters are for test/development environments — don't use them in production deployments.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.autopilotmonitor.com/reference/agent-command-line.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
