Deploying Huntress with Ninja RMM
UPDATE 2021-02-22: Ninja introduced a new variable called
$env:NINJA_ORGANIZATION_NAME that eliminates the need for our API. The new way is just a simple deployment script that needs to be set up in your Ninja RMM instance.
UPDATE 05/26/2020: Huntress has updated the NinjaRMM deployment script with the following enhancements: Forcing PowerShell to use TLS 1.2 or greater; this is part of our effort to phase out support for TLS 1.0/1.1. Improved validation that the agent installed properly and registered. Enhanced logging in case we need to help troubleshoot. Please update the PowerShell script created in Download, Edit, and Import the Huntress Deployment Script for NinjaRMM.
NinjaRMM provides the ability to create Scheduled Scripts to deploy third-party software. This document provides the instructions to add a Scheduled Script to your Policies to deploy the Huntress Agent to your customer's computers.
The Organization Name and Organization key will match the site name from NinjaRMM.
This guide is meant to provide a basic overview of deploying the Huntress Agent using NinjaRMM. We are not able to offer comprehensive support for NinjaRMM, please refer to the NinjaRMM documentation for full details regarding the usage of NinjaRMM policies and scheduled scripts.
NOTE: If you've used the previous version of this script where the organization keys were not automatically pulled from NinjaRMM, 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 NinjaRMM and delete the old organization from the Huntress console.
- Retrieve Your Huntress Account Key
Download, Edit, and Import the Huntress Deployment Script for NinjaRMM
- Add a Scheduled Script to Your Policy
Retrieve Your Huntress Account Key
- Login to the Huntress Web Interface.
- Hover over the Huntress options menu in the upper-right corner of the dashboard.
- Select the "Download Agent" option from the menu.
- On the Installer page click the clipboard icon to copy your secret account key to your clipboard.
Download, Edit, and Import Huntress Deployment Script
- Download our PowerShell Deployment Script.
- In your NinjaRMM dashboard, click on "Configuration" in the left-hand menu.
- Click on "Scripting"
- Click on "Create New Script" in the upper right-hand area.
- Paste the entire PowerShell script from step 1 into the left-hand pane. Scroll down to around line 47 and paste your Huntress account secret key over the __ACCOUNT KEY__ text in the script. Scroll down to around line 50 and paste
$env:NINJA_ORGANIZATION_NAMEover the __ORGANIZATION KEY__ text in the script.
Note: It is important that your script matches.
- Fill out the form on the right-hand pane with a name, description, category, scripting language, operating system, and architecture as shown below. You may set custom values for name, description, and category, but the language must be PowerShell and Architecture must be set to All.
- Click the "save" button in the upper-right corner of the script editor.
Add a Scheduled Script to Your Policy
NOTE: This section is provided as a general guideline. You may wish to add the Huntress script to one or more custom policies in your deployment. We are not able to offer comprehensive support for NinjaRMM, please refer to the NinjaRMM documentation for full details regarding the usage of NinjaRMM policies and scheduled scripts.
- Log in to NinjaRMM.
- Navigate to the policy you want to use to install the Huntress Agent by clicking configuration, policies, and the policy name. Alternatively, you can create a new policy. In this example, we're using the "Windows Workstation" policy.
- Click on the Scheduled Scripts menu in the left and then Add a scheduled Script on the right.
- In the Scheduled Script window choose an appropriate name and description for the script. Set the Schedule and Notification preferences to your preferred settings. Click the "Add Script" button.
- Navigate to the category you set for your script in Step 6 of the previous section and click on the script to import it into the schedule.
- Leave the "Preset Parameter" field blank and leave "Run As" set to "System", and click Apply.
- This will close the parameter window. Now click "Add" to add the script to the schedule.
- Click "Save" in the upper right hand corner. You are now ready to deploy the Huntress Agent via NinjaRMM!