-
Notifications
You must be signed in to change notification settings - Fork 5
superops_agent_uninstaller.ps1
Performs quiet uninstallation of the SuperOps RMM Agent using the MSI ProductCode GUID.
This script performs a quiet uninstallation of the SuperOps RMM Agent using the MSI ProductCode GUID. It reports which uninstall method (WMI or CIM) was used, provides diagnostic information such as version, publisher, and registry path detected, and checks for leftover services to suggest manual cleanup commands.
Provides a comprehensive and intelligent uninstallation solution for the SuperOps RMM agent. The script attempts multiple uninstallation methods (WMI and CIM), provides detailed diagnostic information, and performs post-uninstall service checks to ensure complete removal.
- PowerShell 5.1+
- Run as Administrator
- '$SuperOpsModule' must be imported on line 1 for SuperOps execution
None at runtime. The IdentifyingNumber GUID for the SuperOps Agent MSI is hardcoded in the script.
- Designed for execution inside SuperOps RMM
- Keep the module import on line 1
- No tenant-specific settings used
- WMI (Get-WmiObject Win32_Product): Executes uninstall by ProductCode
- CIM (Get-CimInstance Win32_Product): Preferred on newer systems if WMI fails
- Service Check (Get-Service): After uninstall attempt, searches for RMM or SuperOps services that may remain
- Queries WMI for product info and attempts uninstall
- If WMI fails, queries CIM for the same GUID and attempts uninstall
- Prints product details (name, version, publisher, method used)
- Reports clear success or error messages in Style A format
- If no product entry is found, reports as "Already removed" but does not fail
- Performs a post-uninstall service check to detect leftover services and display cleanup commands
- No secrets handled
- Do not paste API keys
- Logs never print secrets
- 0: Success (uninstall executed, or product already absent)
- 1: Script error occurred
[ TARGET PARAMETERS ]
--------------------------------------------------------------
Product GUID : {3BB93941-0FBF-4E6E-CFC2-01C0FA4F9301}
[ UNINSTALL ACTION ]
--------------------------------------------------------------
STATUS : Attempting uninstall via WMI...
STATUS : No matching product found via WMI.
STATUS : No matching product found via CIM.
RESULT : PRODUCT NOT INSTALLED OR ALREADY REMOVED
[ FINAL STATUS ]
--------------------------------------------------------------
UNINSTALL PROCESS FINISHED (NO ACTION NEEDED).
[ SCRIPT COMPLETED ]
--------------------------------------------------------------
- v1.2.2 (2025-08-20): Treats missing product as success (already removed) instead of failure
- v1.2.1 (2025-08-20): Fixed cleanup command string formatting in service check to prevent parse errors
- v1.2.0 (2025-08-20): Added post-uninstall service check with cleanup command suggestions
- v1.1.0 (2025-08-20): Added product details (name, version, publisher) and reported which uninstall method was used
- v1.0.0 (2025-08-20): Initial script creation using WMI and CIM uninstall methods with hardcoded ProductCode GUID
- View Script Source
- Scripts - Back to script index