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

# Desktop agent

> An on-premises agent that lets Triggr workflows run PowerShell, such as Active Directory changes, in a client's network.

The desktop agent is a Windows service on a machine in a client's network. A workflow sends it PowerShell, it runs the script there and the output returns to the workflow.

```mermaid theme={null}
flowchart LR
    T["Triggr cloud"] --> A["Desktop agent"] --> N["On-premises network"]
```

Use it for Active Directory work such as creating users, setting group memberships and disabling accounts, or any other PowerShell: files, registry and services.

## Requirements

* A Windows machine that's always on. The service runs as Local System, so for Active Directory changes install it on a domain controller, or change the service's Log On account to one with the rights your scripts need.
* Windows PowerShell 5.1 or PowerShell 7, plus any modules your scripts use, such as ActiveDirectory.
* Outbound HTTPS (port 443) to `api.triggr-app.com`. The agent only connects out, so it needs no inbound firewall rule.

Traffic is encrypted, each agent authenticates with credentials created for its client, and the scripts it runs are logged. A script can run for up to 10 minutes.

## Set it up

1. [Generate agent credentials](/desktop-agent/generate-credentials) for the client.
2. [Install the agent](/desktop-agent/install) on the machine.
3. Check the client shows the agent Online: under Agent Summary in Studio, or in the client's Agent section in Core.
4. In Studio, write a script and run it from a workflow: see [On-prem scripts](/studio/on-prem/scripts).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.