Skip to main content

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

ContentTypeAvailable OptionsFunction
cPVAL Huntress DeploymentDrop-downWindows, Windows and Macintosh, Disabled,UninstallEnables Huntress auto-deployment as well as uninstallation for Windows or both Windows and Macintosh machines at the organization/location/machine level.
cPVAL Huntress Account KeyTextStores the Huntress Account Key to associate agents with the correct Huntress account.
cPVAL Huntress Org KeyTextStores the Huntress Organization Key. By default, this is the organization's name, but it can be customized if needed.
cPVAL Huntress TagsTextStores one or more tags, separated by commas (optional).

Automation

ContentFunction
Huntress Agent Manager - WindowsThis script automates the installation, repair, uninstallation, or reinstallation of the Huntress Agent for Windows machines.
Install Huntress Agent - MacintoshInstalls the Huntress agent on Macintosh machines, retrieving required keys from custom fields.
Uninstall Huntress Agent - MacintoshSilently uninstalls Huntress from Macintosh machines.

Compound Conditions

ContentFunction
Install Huntress Agent - WindowsTriggers the Huntress Agent Manager - Windows automation on Windows machines where deployment is enabled and Huntress Agent is not installed.
Install Huntress Agent - MacintoshTriggers the Install Huntress Agent - Macintosh automation on Macintosh machines where deployment is enabled and Huntress is not installed.
Uninstall Huntress Agent - WindowsTriggers the Huntress Agent Manager - Windows automation on Windows machines where huntress agent is installed and uninstallation is enabled.
Uninstall Huntress Agent - MacintoshTriggers 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:

Step 3

Create the following Compound Conditions:

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 Deployment custom 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 - Exclude Custom Field as exclusions is handled by cPVAL Huntress Deployment custom field.
  • Renamed the script from Install Huntress Agent - Windows to Huntress Agent Manager - Windows.
  • Fixed the powershell in Huntress Agent Manager - Windows to not throw errors if account key is not provided in case of uninstallation.
  • Added Uninstall Huntress Agent - Macintosh for 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