Skip to main content

Guardz Device Agent Uninstallation Instructions

This article describes the steps you need to take in order to remove/uninstall the Guardz device agent from your device.

Updated today

Manual removal of the agent from a Windows device:

If your agent is updated to version 1.4, only the following step is relevant:

  • Open Settings and navigate to Apps > Installed Apps, then delete the Guardz Agent app.

For older versions, follow the instructions below:

  • Open PowerShell with administrator privileges and run the following commands:

    • sc.exe stop "Guardz Agent"

    • sc.exe delete "Guardz Agent"

  • Open Settings and navigate to Apps > Installed Apps and delete the Guardz Agent app.

  • Open File Explorer and delete the following directories:

    • %SystemRoot%\System32\config\systemprofile\AppData\Roaming\com.guardz

    • %ProgramData%\com.guardz

Manual removal of the agent from a Mac device by Terminal:

If your agent is updated to version 1.4, only the following step is relevant:

  • sudo '/Applications/Guardz Agent.app/Contents/MacOS/Guardz Agent' --mode uninstall
    ​

    For older versions, follow the instructions below:

  • Open Terminal and run the following commands:

    • sudo launchctl bootout system/com.guardz.daemon

    • sudo rm -r /var/root/Library/Application\ Support/com.guardz

    • sudo rm -r /var/root/Library/Logs/com.guardz

    • sudo rm -r /Library/Application\ Support/com.guardz

  • Open Finder and navigate to the /Applications folder.

  • Right-click the Guardz Agent app and select Move to Trash.

You can use the following one-liner script as well:

​Mac script - ends with .sh

Windows script - ends with ps1

Make sure you run them for every machine that has the installed Guardz agents with sudo (or as root).

Bulk removal using a script (RMM)

# Script to uninstall the Guardz Agent # Ensure to run this script with administrative privileges # Define the display name of the application to search for $targetAppName = "Guardz Agent" # Registry paths to check $uninstallKeyPaths = @( "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall", "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall" ) # Initialize a flag to track if the app is found $appFound = $false foreach ($keyPath in $uninstallKeyPaths) { Get-ChildItem -Path $keyPath -ErrorAction SilentlyContinue | ForEach-Object { $appName = (Get-ItemProperty -Path $_.PSPath).DisplayName if ($appName -eq $targetAppName) { $uninstallString = (Get-ItemProperty -Path $_.PSPath).UninstallString if ($uninstallString) { # Clean up the uninstall string if it includes extra arguments if ($uninstallString -like "msiexec*") { # Extract only the MSI product code from the uninstall string if ($uninstallString -match "msiexec\.exe.*?({.*?})") { $productCode = $matches[1] # Use msiexec to uninstall Write-Host "Uninstalling $targetAppName using msiexec..." -ForegroundColor Green Start-Process -FilePath "msiexec.exe" -ArgumentList "/x $productCode /quiet /norestart" -Wait $appFound = $true } } else { # Run the custom uninstaller directly if not MSI-based Write-Host "Running custom uninstaller for $targetAppName..." -ForegroundColor Green Start-Process -FilePath $uninstallString -Wait $appFound = $true } } } } } if (-not $appFound) { Write-Host "The application '$targetAppName' was not found on this system." -ForegroundColor Red }


FAQs: Guardz Device Uninstallation
​

  • Question: Is there a way to run a CLI command on the endpoint to check the Guardz agent version?

    • πŸ“Answer: Yes, you can use a PowerShell command to determine the version of the Guardz agent installed on a Windows endpoint.
      Command:

Get-WmiObject -Class Win32_Product | Where-Object { $_.Name -eq "Guardz Agent" }

Steps:

  1. Open a PowerShell window with administrative privileges.

  2. Copy and paste the command above.

  3. Press Enter.

  4. The output will display details about the Guardz agent, including its version.

Did this answer your question?