Skip to content

Deploy the agent

The agent is optional. It reports each device’s installed software, so you can see which devices run a blocked or outdated version. It also installs the epw command line.

  • Plan: Business or higher for Inventory mode. Premium for Managed mode.
  • Permission: devices:write to create enrollment tokens. devices:read to view devices.
  • Devices: Windows 10 or 11, x64 or arm64. You install as SYSTEM or an elevated administrator.

App names, versions, publishers and product codes, plus device facts. It never sends file paths, URLs or user names. What the agent collects on Connect devices shows the full list.

  1. Go to Devices & Access › Connect devices, to Step 2 · Optional.
  2. Choose Create enrollment token.
  3. Keep the Mode cap at Inventory.
  4. Set Maximum uses to about your fleet size, and Expires after (days).
  5. Choose Create token. The token, starting ewe_, is shown once.

The token can only enroll devices, within its limits. It is visible in deployment logs, so deliver it by policy where you can.

Pick your tool under Deployment tool. Each block on Connect devices has the exact values for your organization.

  1. Create a Windows app (Win32) from the .intunewin of each MSI. Use one app per architecture, with an architecture requirement rule.
  2. Install command:
    msiexec /i EndpointWorksAgent-x64.msi /qn /norestart
  3. Deliver the server URL and token by policy: import the ADMX into the Settings catalog, or use OMA-URI. See Deliver the token by policy.
  4. Uninstall command: "C:\Program Files\EndpointWorks\Agent\ew-agent.exe" uninstall. It retires the device with EndpointWorks first.
  5. Detection rule: Registry, key HKLM\SOFTWARE\EndpointWorks\Agent, value Version, Version comparison, greater than or equal to the version you package.
  6. Return codes: 0 and 1707 success, 3010 soft reboot, 1641 hard reboot, 1618 retry.

Never detect by the MSI product code. It changes on every major upgrade and causes a reinstall loop (1638).

Create one application with two Windows Installer deployment types, x64 and arm64, each with an operating system architecture requirement. Install for the system, whether or not a user is signed in. Use the same detection rule as Intune. Use the fixed UpgradeCode shown on Connect devices for supersedence.

Group Policy can’t pass MSI properties.

  1. Add the ADMX and ADML to your Central Store.
  2. In a computer policy, enable Server URL, Enrollment token and Mode.
  3. Assign the plain MSI under Software installation.

For an RMM tool or a one-off install, run as an administrator or SYSTEM:

msiexec /i EndpointWorksAgent-x64.msi /qn /norestart EW_SERVER_URL=https://api.endpointworks.com EW_ENROLL_TOKEN=ewe_xxxxxxxx

The server URL must be the API host exactly.

Set these values under HKLM\SOFTWARE\Policies\EndpointWorks\Agent (the ADMX writes the same ones):

Value Example
ServerUrl https://api.endpointworks.com
EnrollToken ewe_…
Mode inventory

Policy wins over MSI properties. The token stays on the device, so a reimaged device re-enrolls by itself. If the MSI installs before the policy arrives, the agent waits.

Devices appear under Devices & Access › Devices within about a minute of installing. Each package’s page shows Devices by state: current, update available, blocked version, not approved, or not in catalog.

Managed mode keeps installed catalog packages on the approved version. It adds two-person approval of assignments, rings with soak and auto-halt, pause switches, and signed, hash-bound installs.

Install with EW_DEFER_ENROLL=1, or run ew-agent reset --for-imaging before Sysprep. Enrollment then waits until the image boots on different hardware.

Symptom Fix
The device never appears Run ew-agent status and ew-agent diagnose as administrator. Check the server URL, the token and HTTPS access to the API host.
Create enrollment token shows a plan notice Enrollment tokens need the Business plan or higher.
Intune reinstalls the agent in a loop The detection rule uses the product code. Switch to the registry Version rule.
The agent exits with code 5 The token was refused: wrong, expired, used up or revoked. Create a new token.

All agent exit codes: Agent and epw exit codes.