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.
Before you begin
Section titled “Before you begin”- Plan: Business or higher for Inventory mode. Premium for Managed mode.
- Permission:
devices:writeto create enrollment tokens.devices:readto view devices. - Devices: Windows 10 or 11, x64 or arm64. You install as SYSTEM or an elevated administrator.
What the agent collects
Section titled “What the agent collects”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.
Step 1: Create an enrollment token
Section titled “Step 1: Create an enrollment token”- Go to Devices & Access › Connect devices, to Step 2 · Optional.
- Choose Create enrollment token.
- Keep the Mode cap at Inventory.
- Set Maximum uses to about your fleet size, and Expires after (days).
- 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.
Step 2: Deploy the MSI
Section titled “Step 2: Deploy the MSI”Pick your tool under Deployment tool. Each block on Connect devices has the exact values for your organization.
Intune
Section titled “Intune”- Create a Windows app (Win32) from the
.intunewinof each MSI. Use one app per architecture, with an architecture requirement rule. - Install command:
msiexec /i EndpointWorksAgent-x64.msi /qn /norestart
- 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.
- Uninstall command:
"C:\Program Files\EndpointWorks\Agent\ew-agent.exe" uninstall. It retires the device with EndpointWorks first. - Detection rule: Registry, key
HKLM\SOFTWARE\EndpointWorks\Agent, valueVersion, Version comparison, greater than or equal to the version you package. - 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).
ConfigMgr
Section titled “ConfigMgr”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
Section titled “Group Policy”Group Policy can’t pass MSI properties.
- Add the ADMX and ADML to your Central Store.
- In a computer policy, enable Server URL, Enrollment token and Mode.
- Assign the plain MSI under Software installation.
msiexec
Section titled “msiexec”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_xxxxxxxxThe server URL must be the API host exactly.
Deliver the token by policy
Section titled “Deliver the token by policy”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.
Step 3: Check the first inventory
Section titled “Step 3: Check the first inventory”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
Section titled “Managed mode”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.
Golden images
Section titled “Golden images”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.
Troubleshooting
Section titled “Troubleshooting”| 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.