Deploying Huntress with Datto RMM (Autotask)

NOTE: This guide is meant to provide 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.

When this script is run it will utilize the site name in Datto RMM as the Organization Name in Huntress. If an organization does not yet exist in Huntress it will create it. 

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 newly created 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 three step process that involves:

1
Downloading and Importing the Huntress Agent Deployment Component (Datto RMM component script)
2
Customizing the Huntress Agent Deployment Script
3

Scheduling the Script to Run

Download and Import the Huntress Deployment Script

  1. Download the Huntress Agent Deployment 2.0 Component from our GitHub repository.
  2. In the Datto RMM dashboard, click on Components tab and then select the Import Component button.
    Next, select the Huntress Deployment Component file you just downloaded and click Upload button.

Customize the Huntress Agent Install Script

  1. After uploading the component you will see its details. Scroll down to the "Script" section and click the "Expand" button. We need to edit a variable inside the script.
  2. In the Script frame, scroll down to the line that has $AccountSecretKey = "__KEY__". Replace the __KEY__ with your account key.
  3. After adding your account key to the script, click the Save button at the bottom of the component window.
  4. Optional: If you want to be able deploy Huntress quickly in one-off scenarios, be sure to set it as a favorite by clicking the star icon once (it will turn gold) in the list of scripts in the component section.

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 exactly 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. 

  1. On the Sites tab, select the site you want to deploy to and then click the schedule job button (looks like a cog wheel).
  2. In the new "Scheduled A Job" view, name the job and click on the "Add a Component" link:
  3. In the Component option window check "Huntress Agent Deployment 2.0" and click the "Save" button:
  4. Set any other options for the job you may want and click the "Save" button:
  5. 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.

  1. Navigate to the Jobs tab > Competed Jobs tab > click on the job
  2. On job view click the "stdout" and "stderr" buttons to view the log from any agent that may have failed to aid in troubleshooting.

Still need help? Contact Us Contact Us