Deploying Huntress with Datto RMM (ComStore)
This guide provides a basic overview of deploying the Huntress Agent using Datto RMM—formerly Autotask Endpoint Management (AEM). While we are not able to offer comprehensive support for Datto RMM, there is documentation available related to scripting.
This deployment component will use a global variable named HUNTRESS_ACCOUNT_KEY (defined in Step 1 below) for the Huntress "Account Key" and the Datto RMM "Site Name" as the Huntress "Organization Name" in Huntress. (Datto RMM exposes the site name by setting an environment variable named CS_PROFILE_NAME, which is what the component uses for the Huntress organization name.) If the organization does not yet exist in Huntress, it will be created automatically.
In the rare instances where the CS_PROFILE_NAME variable is not set, the placeholder organization MISSING_CS_PROFILE_NAME will be used. You can always move agents to the appropriate organization after the installation.
- Datto RMM HUNTRESS_ACCOUNT_KEY variable → Huntress Account Key (manually retrieve from the Huntress web portal)
- Datto RMM Site Name (CS_PROFILE_NAME) → Huntress Organization Name
NOTE: If you've used the previous version of this script where the organization keys were not automatically pulled from Datto RMM, a duplicate organization may be created if there is a name mismatch. To correct this, move the agents from the old organization into the new one matching the site name in Datto RMM and delete the old organization from the Huntress console.
Installing any product should be a breeze, and that's especially true with Huntress. We've created a deployment script for Datto RMM that will install the Huntress agent on 32 and 64-bit Windows systems (Vista/Server 2008 and above) without any user interruptions or reboots. This is a four-step process that involves:
- Configure your Huntress Account Key in Datto RMM.
- Download the Huntress Deployment script from the ComStore
- Scheduling the Script to Run
- Verify the Job Completed Successfully
Configure Your Huntress Account Key
1. From the "Setup" menu, select "Account Settings":
2. On the "Setup" page, navigate to the "VARIABLES" section and click the "Add Variable" button:
3. Create a variable named "HUNTRESS_ACCOUNT_KEY" and enter your account key in the value field:
(To get your Huntress Account Key, click the "Download Agent" link in your Huntress account. More information here.)
Download the Huntress Deployment script from the ComStore
Download instructions here:
- Navigate to the ComStore menu at the top, then the Scriptscategory.
- Click on the Huntress Agent Deployment item and then click the "Add to my Component Library" button at the bottom.
- Verify the Huntress Agent Deployment Component is present in your Components list by clicking the "Components" menu at the top and choosing the "Scripts" category. The "Huntress Agent Deployment" component should be visible in the list.
Schedule the Script to Run
You can deploy Huntress agents with Datto RMM by either the sites list or the devices tab within a site. In this example, we're doing it from the Sites list, but the process is precisely the same from the device tab, with the exception of choosing the specific devices for deployment vs. the entire site. If you've added it as a favorite in step 4 above, you can use the "Run a quick job" button vs. the "Schedule a job" button to perform a quick one-off install from both the site and device lists.
- On the Sites tab, select the site you want to deploy to and then click the schedule job button (looks like a cog wheel).
- In the new "Scheduled A Job" view, name the job and click on the "Add a Component" link:
- In the Component option window check "Huntress Agent Deployment [WIN]" and click the "Save" button:
- Set any other options for the job you may want and click the "Save" button (these options will not change the functionality of the script):
NOTE: Regarding the reinstallAgent and reregisterAgent flags, do not set these to anything other than False unless you're aware of when to use them, or are otherwise directed by Huntress support.
reinstallAgent - This option is normally not needed. It will re-install the agent. (Useful for "repairing" an agent; this will replace all associated files and restart the agent services.)
reregisterAgent - This option is normally not needed. It forces the agent to re-register after re-installing. (Useful if the agent was previously deployed with an incorrect Huntress account key. If used when not required, you may end up with duplicate agents!)
- When prompted to "run this job now" click "OK":
Verifying the Job Completed Successfully
You can check for deployment errors by viewing the job status.
- Navigate to the Jobs tab > Competed Jobs tab > click on the job
- On job view, click the "stdout" and "stderr" buttons to view the log from any agent that may have failed to aid in troubleshooting.
The "Stdout" field under the completed scripts will show each step performed:
If the agent does not install correctly, there are options within the DattoRMM Huntress Install Script to reinstall the agent and/or force it to reregister. Repeat the steps in Scheduling the Script to Run, but after Step 3., select the options for "reinstallAgent" and/or "registerAgent:"
Need something else?
The DattoRMM Huntress Install Script is written in PowerShell. You can view the source here.
If you need any assistance from Huntress, or if you notice a step that's missing, please contact us at firstname.lastname@example.org.