# Agent uninstallation via Intune Last Updated On: 15 Oct 2026 This document clearly explains the process of uninstalling agent via Intune. **When to use this** Use this method if a device's record was deleted from the Endpoint Central portal while the agent is still installed on the endpoint, and there is no direct option to uninstall and reinstall the agent through the console. ## Generate Agent Cleanup Tool Generate agent cleanup tool by following instructions in the [document](https://www.manageengine.com/products/desktop-central/help/device-onboarding/how-to-uninstall-agent-using-agentcleanup-tool.html). ## Create app package 1. Download the zip [file](https://github.com/Microsoft/Microsoft-Win32-Content-Prep-Tool). ![Download the zip file for agent uninstallation via intune](https://cdn.manageengine.com/sites/meweb/images/desktop-central/help/device-onboarding/intune7.webp) **Note** Copy the `agentcleanuptoolclient.exe` to the extracted folder. 2. Extract `IntuneWinAppUtil.exe` from the downloaded zip folder and double-click the executable to provide the following input: - **Source folder:** `` - **Setup file:** `AgentCleanupToolClient.exe` - **Output folder:** `` - **Do you want to specify catalog folder (Y/N)?:** N 3. `agent.intunewin` will be created in the specified ``. 4. Use the **AgentCleanupToolClient.intunewin** app package for deployment in Intune. ## Configure Intune To configure the app: 1. Login to EndPoint Manager Admin Center. 2. Click on **Apps > All Apps > Add**. 3. Select App Type to Windows app (Win32). ![intune select app type](https://cdn.manageengine.com/sites/meweb/images/desktop-central/help/device-onboarding/intune1.webp) 4. Select package file and browse to `AgentCleanupToolClient.intunewin`. ![Select package file and browse to AgentCleanupToolClient.intunewin for agent uninstallation via intune](https://cdn.manageengine.com/sites/meweb/images/desktop-central/help/device-onboarding/intune2.webp) 5. Enter Name of the Application and Publisher Information and click Next. ![Enter Name of the Application and Publisher Information and click Next](https://cdn.manageengine.com/sites/meweb/images/desktop-central/help/device-onboarding/intune3.webp) 6. Provide the install and uninstall command in the program tab: - Install Command: `AgentCleanupToolClient /silent` - Uninstall Command: `AgentCleanupToolClient /silent` ![installation and uninstallation commands for agent uninstallation via intune](https://cdn.manageengine.com/sites/meweb/images/desktop-central/help/device-onboarding/intune4.webp) ![select requirements to uninstall agent via intune](https://cdn.manageengine.com/sites/meweb/images/desktop-central/help/device-onboarding/intune5.webp) 7. Configure Detection rule manually: - **Rule Type:** Registry - **Key Path:** `HKEY_LOCAL_MACHINE\SOFTWARE\AdventNet\DesktopCentral\DCAgent` - **Value name:** `DCAgentVersion` - **Detection Method:** Value does not exist - **Associated with a 32-bit app on 64-bit clients:** YES ![configure detection rule manually to uninstall agent via intune](https://cdn.manageengine.com/sites/meweb/images/desktop-central/help/device-onboarding/intune6.webp) 8. Assign the application to your pilot users or all the users as per your requirement.