From the admin console: Settings > API Keys > Create, or use the Deploy Agent wizard which generates one for you. The token is prefixed ppk_.
Download the latest MSI from /downloads/PatchPilot-Agent.msi, then install with msiexec:
msiexec /i PatchPilot-Agent.msi ORGAPIKEY=ppk_your_token /qn
The /qn flag runs silent. Drop it for an interactive install when troubleshooting on a single machine.
For ad-hoc installs, the wizard provides a one-liner. Run it from an elevated PowerShell:
iwr https://patchpilot.co.uk/downloads/Install-PatchPilot-Agent.ps1 -UseBasicParsing | iex
The script will prompt for the token (or accept it via the -Token parameter).
Download the .intunewin package from /downloads/PatchPilot-Agent-latest.intunewin. In Intune, create a Win32 app with these install / uninstall commands:
Install: msiexec /i PatchPilot-Agent.msi ORGAPIKEY=ppk_xxx /qn
Uninstall: msiexec /x {guid-from-msi} /qn
Set the detection rule to HKLM\SOFTWARE\PatchPilot\Agent\Version existing.
The MSI is a standard Windows Installer package — deploy it like any other software via Group Policy software installation or SCCM application deployment. Use the same ORGAPIKEY property.
PatchPilotAgent (LocalSystem, automatic start).C:\ProgramData\PatchPilot\.C:\ProgramData\PatchPilot\logs\ — rotated daily.msiexec /x {guid-from-msi} /qn
Or from Settings > Apps > Installed apps, uninstall PatchPilot Agent. The agent retires itself in the admin console on graceful uninstall.