Introduction
If you are a larger organization, you may need to uninstall a large amount of endpoint agents. It may be more efficient to uninstall these endpoint agents in a "bulk" operation, and this article walks through the options available for bulk editing.
These bulk uninstallation options are only currently supported for automated deployments. Also, due to the very customized nature of this installation type, this article provides guidelines, while assuming you have an understanding of the agent in deployed across you automated environment.
Also, if you have Agent Protection on, it will need to be disabled globally to successfully uninstall all endpoint agents.
See the following articles for more:
- Deploying the Windows endpoint agent via Intune
- Deploying the macOS agent via Intune
- Deploying the macOS agent via JAMF
Using the PowerShell Script
To use the PowerShell script, you will need to edit the script that you originally used for installations in your deployment tool - paste the uninstall parameter into the command that runs the installation script.
To learn more about PowerShell installations, and what needs to be edited, visit Windows Install PowerShell Script for RMM/MDM.
.(PARAMETER): uninstall A switch that indicates the script should uninstall the MDR agent instead of installing it. If this flag is provided, the script will stop any running services and uninstall the agent from the machine.
powershell ./agent_install_script.ps1 -uninstall
Using the Command Line
If you want to perform a bulk uninstall from the command line, begin by logging into your automated deployment tool and
use the following command:
msiexec.exe /x <FULL_PATH_TO_MSI> /qn
Notes:
- the /x is for the uninstall (vs /i)
- the /qn is for silent uninstall
- the <FULL_PATH_TO_MSI> should list where the msi is located
- key to note that you need to use the MSI version that matches the version of the agents that you want to uninstall
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article