Huntress Agent (Uninstall) - MAC
Summary
This script uninstalls the Huntress agent from a Mac system.
Create Script
Please create a new "PowerShell" style script to implement this process.
Name: Huntress Agent (Uninstall) - MAC
Description: This script uninstalls the Huntress agent from a Mac system.
Category: Custom
Script
Row 1 Function: Bash Script
Paste the following Bash script and set the expected script execution time to 900 seconds.

Step 2 Function: Script Log
- Add a new row in the If Section of the If/Else part by clicking the Add Row button.
- Search and select the
Script Logfunction. - Input the following:
Step 3 Logic: If/Then
- Add a new
If/Then/Elselogic from the Add Logic dropdown menu.
Row 3a Condition: Output Contains
- Type
Failed to uninstall Huntressin the Value box.
Row 3b Function: Script Exit
- Add a new row in the If Section of the If/Else part by clicking the Add Row button.
- Search and select the
Script Exitfunction. - Input the following:
Step 4 Function: Script Exit
- Add a new row in the If Section of the If/Else part by clicking the Add Row button.
- Search and select the
Script Exitfunction. - Leave it blank
Step 5: Complete Script
Script Deployment
For now, the task has been created to run manually on the machines.
Go to Automations > Tasks.
Search for Huntress Agent (Uninstall) - MAC.
Then click on Schedule and provide the necessary parameters for script completion.

Output
- Script log
Changelog
2025-04-10
- Initial version of the document