Agent and epw exit codes
epw status and epw healthcheck
Section titled “epw status and epw healthcheck”These return only 0, 1 or 2, so Intune Remediations can use them.
| Code | Meaning |
|---|---|
| 0 | Compliant and healthy |
| 1 | Anything else. The condition is in error.code in --json output |
| 2 | Usage |
Install outcomes (other epw commands)
Section titled “Install outcomes (other epw commands)”| Code | Meaning |
|---|---|
| 0 | Success, already compliant, or nothing to do |
| 3010 | Succeeded; a reboot is needed to finish |
| 1618 | Another install is in progress. Retry later |
epw never returns 1641, and the agent never reboots a device.
Agent conditions (ew-agent and epw)
Section titled “Agent conditions (ew-agent and epw)”| Code | error.code |
Meaning | Fix |
|---|---|---|---|
| 1 | error |
Error | Run ew-agent diagnose. |
| 2 | usage |
Bad arguments, including a path, URL, hash or version passed to epw |
Check the command. |
| 3 | configuration |
No server URL, policy pins another server, or EpwEnabled=0 |
Check HKLM\SOFTWARE\Policies\EndpointWorks\Agent. |
| 4 | retry_later |
Offline, network error, 429 or 503, or the broker couldn’t start | Retry, or add --queue. |
| 5 | enrollment_rejected |
The enrollment token was refused | Create a new token. |
| 6 | revoked |
The device was revoked | Re-enroll with a new token. |
| 7 | retired |
The device was retired | Re-enroll if it should come back. |
| 9 | not_enrolled |
Needs enrollment | Deliver a token. |
| 10 | lock_timeout |
Another request held the lock | Retry. |
| 11 | not_trusted |
The broker or state directory isn’t trusted | Run epw doctor --repair as administrator. |
| 12 | needs_elevation |
An admin-only command or flag | Run as administrator. |
epw request results
Section titled “epw request results”| Code | error.code |
Meaning |
|---|---|---|
| 20 | not_in_catalog |
Not in your catalog |
| 21 | not_available |
Not available to this device: not assigned, not ring-allowed yet, ineligible, or user scope only |
| 22 | not_entitled |
Your plan doesn’t include the feature |
| 23 | refused_by_policy |
Requests or self-service off, local policy, protected or required item, Intune-owned |
| 24 | not_installed |
upgrade target isn’t installed. Nothing ran |
| 25 | pending |
Accepted or queued, not finished |
| 26 | action_failed |
The install failed. error.issueNumber names the install issue |
| 27 | baseline_partial |
Some required baseline packages failed |
| 28 | paused |
A pause or halt is active |
| 29 | rate_limited |
A per-user, device, package or organization limit |
When several apply, the first in this order wins: 2, 12, 3, 11, 4, 22, 20, 21, 23, 28, 29.
Intune return codes for baseline apps
Section titled “Intune return codes for baseline apps”0 is success, 3010 is a soft reboot. Retry on 1618, 4, 10, 25 and 29. Everything else, 27 included, is a failure.