This guide covers removing the SuperIT RMM agent from Windows devices, one at a time or in bulk. It mirrors the installation guide: use whichever method you deployed with.

Required permissions

Required Permissions

Uninstalling requires:

  • Local administrator rights on the device (SYSTEM, as used by an RMM tool or Intune, has them)
  • Access to the SuperIT portal to remove the device from your team

What gets removed

The agent is installed by an MSI package named SuperIT Agent. Uninstalling it:

  1. Stops and deletes the SuperIT Windows service
  2. Removes the program files from C:\Program Files (x86)\SuperIT\agent
  3. Removes the bootstrap credentials file from C:\ProgramData\SuperIT

It deliberately leaves behind the configuration and data in C:\ProgramData\SuperIT (config.yaml, identity.json, logs) and the agent's stored credentials, so that upgrades keep their settings. If you are decommissioning a device, or reinstalling it into a different team, also follow Remove leftover data.

Note

The agent updates itself, and each update has a new MSI product code. Don't hard-code a product code you looked up at install time: find the installed one at the moment you uninstall, as the methods below do.

Uninstall script

uninstall-superit.ps1 finds the installed agent, uninstalls it silently and checks the service is gone. The Powershell, Group Policy and MDM methods below all use it. Run it elevated or as SYSTEM; the installation guide covers execution policy and running under an RMM agent.

Pass -RemoveData to also delete the leftover configuration, identity and credentials. Without it, only the program is removed.

# uninstall-superit.ps1
# Uninstall the SuperIT Agent. Add -RemoveData to also delete its data and credentials.
param([switch]$RemoveData)

$uninstallKeys = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*',
                 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*'
$apps = @(Get-ItemProperty $uninstallKeys -ErrorAction SilentlyContinue |
          Where-Object DisplayName -eq 'SuperIT Agent')

if ($apps.Count -eq 0) {
    Write-Output "SuperIT Agent is not installed"
}

$rebootNeeded = $false
foreach ($app in $apps) {
    Write-Output "Uninstalling SuperIT Agent $($app.DisplayVersion) ($($app.PSChildName))"
    $proc = Start-Process msiexec.exe -Wait -PassThru -ArgumentList "/x $($app.PSChildName) /quiet /norestart"
    switch ($proc.ExitCode) {
        0       { }
        1605    { Write-Output "Already removed" }
        3010    { $rebootNeeded = $true }
        default { Write-Error "msiexec failed with exit code $($proc.ExitCode)"; exit $proc.ExitCode }
    }
}

# The installer removes the service; clean it up if anything was left behind
if (Get-Service -Name 'SuperIT' -ErrorAction SilentlyContinue) {
    Stop-Service -Name 'SuperIT' -Force -ErrorAction SilentlyContinue
    sc.exe delete SuperIT | Out-Null
}

$failures = @()
if ($RemoveData) {
    $dataDir = "$env:ProgramData\SuperIT"
    foreach ($path in $dataDir, "${env:ProgramFiles(x86)}\SuperIT", "$env:ProgramFiles\SuperIT") {
        if (Test-Path $path) {
            Remove-Item -Path $path -Recurse -Force -ErrorAction SilentlyContinue
        }
    }
    # Program files locked until a restart are removed by Windows then; the data must go now
    if (Test-Path $dataDir) {
        $failures += "could not delete $dataDir"
    }
    [Environment]::SetEnvironmentVariable('SUPERIT_INSTALL_KEY', $null, 'Machine')

    # The agent's credentials live in the SYSTEM account's Credential Manager,
    # so they can only be deleted from a script running as SYSTEM
    if ([Security.Principal.WindowsIdentity]::GetCurrent().IsSystem) {
        cmdkey /delete:superit:operational 2>&1 | Out-Null
        if (cmdkey /list:superit:operational | Select-String 'Target:') {
            $failures += "could not delete the stored credential superit:operational"
        }
    } else {
        $failures += "not running as SYSTEM, so the stored credential superit:operational was not deleted"
    }
}

if (Get-Service -Name 'SuperIT' -ErrorAction SilentlyContinue) {
    $failures += "the SuperIT service is still present"
}
if ($failures.Count -gt 0) {
    $failures | ForEach-Object { Write-Error "Uninstall incomplete: $_" }
    exit 1
}
if ($rebootNeeded) {
    Write-Output "SuperIT Agent uninstalled; a restart is needed to finish removing files"
    exit 3010
}
Write-Output "SuperIT Agent uninstalled successfully"

The script exits 0 on success, 3010 when a restart is needed to finish (it never restarts the device itself), and 1 when anything it was asked to remove is still there, naming what was left, so RMM tools can report the result.

Uninstall Methods

Manual Uninstall

Recommended for single devices

  1. Open Settings → Apps → Installed apps (or Control Panel → Programs and Features on older Windows)
  2. Find SuperIT Agent
  3. Click Uninstall and confirm

Command Line Uninstall:

From an elevated PowerShell prompt, look up the installed product code and pass it to msiexec:

$app = Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*',
                        'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*' |
       Where-Object DisplayName -eq 'SuperIT Agent'
$app | Select-Object DisplayName, DisplayVersion, PSChildName

msiexec /x $app.PSChildName /quiet /norestart

If you still have the MSI file for the exact version installed, msiexec /x superit-agent-amd64.msi /quiet /norestart also works. Because the agent updates itself, the copy you installed from is usually out of date, so prefer the product code lookup above.

Automated Script

For bulk removal through an RMM tool, or as a scheduled task

Save the uninstall script as uninstall-superit.ps1 and run it without changing the execution policy:

powershell.exe -ExecutionPolicy Bypass -File uninstall-superit.ps1 -RemoveData

Run it as SYSTEM (most RMM tools do) so -RemoveData can also delete the stored credential; from an elevated prompt as an administrator it removes everything else and exits 1 to say the credential is left.

Group Policy Removal (Windows)

The installation guide sets Uninstall this application when it falls out of scope to No, and the agent updates itself after it is installed, so removing the GPO does not uninstall the agent, and removing the package from Group Policy may not find the version that is now installed.

Instead, deploy the uninstall script as a computer startup script:

  1. Remove the install: Unlink or delete the "SuperIT Agent Deployment" GPO so the agent is not installed again
  2. Create GPO: Create a GPO named "SuperIT Agent Removal" and link it to the same Organizational Units
  3. Add the script:
    Computer Configuration → Policies → Windows Settings → Scripts (Startup/Shutdown) → Startup
    1. Select the "PowerShell Scripts" tab → Add
    2. Script name: \\server\share\uninstall-superit.ps1
    3. Script parameters: -RemoveData
  4. Apply GPO: Use gpupdate /force and restart a test device. Startup scripts run as SYSTEM, so -RemoveData also removes the stored credentials.
  5. Clean up: Once the devices are clear, unlink the removal GPO

Mobile Device Management (MDM)

Microsoft Intune

Because each agent update changes the MSI product code, an Intune line-of-business app's uninstall command will stop matching once a device has updated. Use the uninstall script instead:

  1. Remove the install assignment: In the SuperIT Agent app you deployed with the installation guide, remove its Required assignment for these devices (or delete the app). Otherwise Intune installs the agent again after it is removed.
  2. Deploy the script, either as a Win32 app or as a platform script.

Win32 app (recommended): package uninstall-superit.ps1 as an .intunewin file with the Microsoft Win32 Content Prep Tool and set:

Install: powershell.exe -ExecutionPolicy Bypass -Command "exit 0"
Uninstall: powershell.exe -ExecutionPolicy Bypass -File uninstall-superit.ps1 -RemoveData
Install behavior: System
Detection rule: File C:\Program Files (x86)\SuperIT\agent\superit-agent.exe exists
Intune requires an install command, but this package is only for removal, so it does nothing. Assign the app to the device group as Uninstall only.

Platform script: go to Devices → Scripts and remediations → Platform scripts → Add → Windows 10 and later, upload uninstall-superit.ps1, set Run this script using the logged on credentials to No so it runs as SYSTEM and Run script in 64 bit PowerShell Host to Yes, and assign it to the device group. Platform scripts can't take parameters, so to remove data as well, change the param(...) line of your copy to param([switch]$RemoveData = $true).

Remove leftover data

Skip this if you plan to reinstall the agent on the same device into the same team: the leftover files let it keep its configuration and identity.

Remove it when decommissioning a device, or before reinstalling into a different team, because a reinstall otherwise reuses the old identity and credentials. The script's -RemoveData switch does all of this; to do it by hand, from an elevated prompt:

  1. Delete the data directory (configuration, identity.json, logs, command history):
    Remove-Item -Path "C:\ProgramData\SuperIT" -Recurse -Force
  2. Remove the install key environment variable, if you set one while troubleshooting:
    [Environment]::SetEnvironmentVariable('SUPERIT_INSTALL_KEY', $null, 'Machine')
  3. Delete the stored credential superit:operational. The agent runs as SYSTEM and keeps it in SYSTEM's Credential Manager, so this has to run as SYSTEM, for example through your RMM tool, Intune, or psexec -s:
    cmdkey /delete:superit:operational

Remove the device from SuperIT

Uninstalling the agent stops it reporting, but the device stays in your team, shown as offline. To remove it, log in to app.superit.ai, go to Devices and remove the device from your team.

Verify removal

The service should no longer exist:

Windows:

sc query SuperIT
reports The specified service does not exist as an installed service.

Windows powershell:

Get-Service "SuperIT*"
returns nothing.

SuperIT Agent should no longer appear in Settings → Apps → Installed apps.

If the uninstall fails, run it again from an elevated PowerShell prompt with a verbose log and check the end of the file for the error:

$app = Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*',
                        'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*' |
       Where-Object DisplayName -eq 'SuperIT Agent'
msiexec /x $app.PSChildName /quiet /norestart /l*v "$env:TEMP\superit-uninstall.log"

Next Steps: To install the agent again, follow the installation guide.