Huntress Agent Deployment
Purpose
This solution is designed to configure the automatic deployment of the Huntress Agent on Windows and Macintosh machines that are missing the agent, using the NinjaOne platform.
Associated Content
Custom Field
| Content | Type | Available Options | Function |
|---|---|---|---|
| cPVAL Huntress Deployment | Drop-down | Windows, Windows and Macintosh, Disabled,Uninstall | Enables Huntress auto-deployment as well as uninstallation for Windows or both Windows and Macintosh machines at the organization/location/machine level. |
| cPVAL Huntress Account Key | Text | Stores the Huntress Account Key to associate agents with the correct Huntress account. | |
| cPVAL Huntress Org Key | Text | Stores the Huntress Organization Key. By default, this is the organization's name, but it can be customized if needed. | |
| cPVAL Huntress Tags | Text | Stores one or more tags, separated by commas (optional). |
Automation
| Content | Function |
|---|---|
| Huntress Agent Manager - Windows | This script automates the installation, repair, uninstallation, or reinstallation of the Huntress Agent for Windows machines. |
| Install Huntress Agent - Macintosh | Installs the Huntress agent on Macintosh machines, retrieving required keys from custom fields. |
| Uninstall Huntress Agent - Macintosh | Silently uninstalls Huntress from Macintosh machines. |
Compound Conditions
| Content | Function |
|---|---|
| Install Huntress Agent - Windows | Triggers the Huntress Agent Manager - Windows automation on Windows machines where deployment is enabled and Huntress Agent is not installed. |
| Install Huntress Agent - Macintosh | Triggers the Install Huntress Agent - Macintosh automation on Macintosh machines where deployment is enabled and Huntress is not installed. |
| Uninstall Huntress Agent - Windows | Triggers the Huntress Agent Manager - Windows automation on Windows machines where huntress agent is installed and uninstallation is enabled. |
| Uninstall Huntress Agent - Macintosh | Triggers the Uninstall Huntress Agent - Macintosh automation on Macintosh machines where huntress agent is installed and uninstallation is enabled. |
Implementation
Step 1
Create the following custom fields:
Step 2
Create the following Automations:
- Huntress Agent Manager - Windows
- Install Huntress Agent - Macintosh
- Uninstall Huntress Agent - Macintosh
Step 3
Create the following Compound Conditions:
- Install Huntress Agent - Windows
- Install Huntress Agent - Macintosh
- Uninstall Huntress Agent - Windows
- Uninstall Huntress Agent - Macintosh
FAQ
1. Can the automations be executed manually and independently of the deployment custom fields?
Yes, the automations can be executed manually without relying on the deployment custom fields. If deployment is not enabled or the machine is excluded, the scripts can still be run manually to perform the desired actions.
2. Is the cPVAL Huntress Account Key custom field mandatory for the auto-deployment solution to work?
Yes, the cPVAL Huntress Account Key custom field is mandatory for the auto-deployment solution to function correctly. It is used to associate the Huntress Agent with the appropriate Huntress account.
3. What actions can the Windows script perform, and how are they controlled?
The Windows script can perform installation, repair, uninstallation, or reinstallation of the Huntress Agent for Windows machines. These actions are controlled by the Action runtime parameter of the script, which can be set to Install, Repair, Uninstall, Reinstall, or Reregister.
4. Why is the auto-deployment not working for a client even after enabling it?
If the auto-deployment is not working for a client, verify whether the organization, location, or machines are using a different agent policy. If they are, the compound conditions must be added to those specific agent policies as well to ensure the deployment functions correctly.
Changelog
2026-06-02
- Added Uninstall option to the
cPVAL Huntress Deploymentcustom field and changed its scope to location and computer. Location and machine can be excluded from the solution, using this custom field only. - Removed
cPVAL Huntress Install - ExcludeCustom Field as exclusions is handled bycPVAL Huntress Deploymentcustom field. - Renamed the script from
Install Huntress Agent - WindowstoHuntress Agent Manager - Windows. - Fixed the powershell in
Huntress Agent Manager - Windowsto not throw errors if account key is not provided in case of uninstallation. - Added
Uninstall Huntress Agent - Macintoshfor Huntress agent uninstallation on MAC machines. - Added uninstallation scripts to the document.
- Added compound conditions Uninstall Huntress Agent - Windows and Uninstall Huntress Agent - Macintosh for uninstallation.
- Updated the documents as per our new template.
2025-04-11
- Initial version of the document