Can Automox Be Used to Stop the Agent Service or Uninstall the Automox Agent?
Issue
An administrator wants to stop the Automox agent service or remove the Automox agent from devices, often at scale through an MDM tool such as Microsoft Intune. Common symptoms in this scenario include:
- An Automox policy or worklet that stops or uninstalls the agent appears stuck In Progress or Pending in the console and never reports a result.
- An Intune (or other MDM) uninstall of the Automox agent MSI completes but leaves the device behind in the console.
- The agent uninstall or a subsequent reinstall fails on Windows because another installation is already running.
Environment
- Automox (current agent release)
- Windows, macOS, and Linux devices (the MDM examples below focus on Windows)
- MDM deployment tools such as Microsoft Intune (line-of-business app deployments)
- Automox console: Devices page, Policies, Worklets
Overview
The short answer is: technically yes, but not recommended.
The Automox agent is the channel a device uses to report command results back to the platform. When the agent itself is the thing being stopped or removed, the last step of that work — reporting success — can never happen, because the reporting channel is gone. The command therefore remains unacknowledged in the console. This is expected behavior, not a failure of the script or worklet.
Separately, uninstalling the agent binaries does not remove the device's record from the Automox console. The correct way to clear the platform side is to remove the device in the console (Devices select the device Delete) — no local deregister command needs to be run on the device.
Resolution
Preferred: uninstall outside of Automox, then remove the device in the console
- Uninstall the agent using Add or Remove Programs, an
msiexec /xcommand, or your MDM tool (for Intune, the line-of-business uninstall assignment). - Remove the device from the Automox console: Devices select the device Delete. This clears the device's registration and console record. Removing the device in the console is the supported cleanup path; do not script local deregister commands on the endpoint for this purpose.
- Verify the device no longer appears on the Devices page.
The order is flexible — devices can be removed from the console before or after the local uninstall. Removing a device from the console does not uninstall the agent software from the endpoint; the binaries must still be removed locally or via MDM.
Removing or stopping the agent at scale with a worklet (last resort)
Automox itself can be used to dispatch a script or worklet that stops the agent service or uninstalls the agent, but only with the following expectations:
- Run the removal asynchronously (for example, as a scheduled task or detached process) so the agent process is not killing its own parent mid-script.
- Expect the policy result to remain Pending or unacknowledged in the console — the agent is removed before it can report success. Verify completion on the devices themselves, not from the policy results.
- After the removal runs, remove the affected devices from the Devices page to clean up the console.
- Do not use this method to "restart" the agent by stopping the service without a follow-up start action in the same script; stopping the service alone leaves the device unmanaged and the command stuck.
If the uninstall or reinstall fails on Windows
- Check for competing Windows Installer activity. Only one MSI transaction can run at a time; if other
msiexec.exeinstances are running (for example, patching in progress or a stuck earlier install), the agent uninstall or install fails. Open Task Manager, look for multiple Windows Installer (msiexec.exe) processes, and either wait for them to finish or end the stuck instances, then retry. - If the uninstall fails due to corrupted installation files, a missing
amagent.exe, or leftovers from a previous install, follow Cannot Uninstall Automox Agent, which includes a cleanup script for broken installations.
Notes
- Uninstall/reinstall is often attempted as a fix for a different problem: the agent is installed and the service is running, but the device never appears in the console. That symptom usually means the agent installed without a valid access key and is running unregistered — reinstalling every device is not necessary. See How to fix devices that are missing from the Dashboard before removing agents at scale for this reason.
- Removing a device from the console clears its platform registration but does not uninstall the agent software from the endpoint.