Team: Huntress Managed Endpoint Detection and Response
Product: Intune (Win32 app)
Environment: Windows 10 and later
Summary: Automated Huntress agent deployment via Intune (Win32 app)
Deploying the Huntress agent via Microsoft Intune is easy and can be accomplished in one of two methods. This is the app deployment method whilst the other is via a PowerShell script deployment using the built in Intune Scripts and Remediations option, which is documented further here.
Microsoft Intune is a complex and powerful tool for managing endpoints and mobile devices. This is a guideline using basic settings to accomplish the deployment of the Huntress agent. Your specific Intune setup may require tweaking or changes. Huntress support is not able to perform advanced Intune troubleshooting, please consult the Microsoft documentation or their support channels for Intune assistance.
In this Article
Install PowerShell via Win32 App (recommended method)
To configure the deployment using this method you will need to download two items and save them to your local system to create the .intunewin package needed by Intune.
- First, you need to download the IntuneWinAppUtil from Microsoft's github. As we'll only describe basic functionality of this tool in this document it is recommended you review the full Microsoft instructions on preparing a Win32 app in Intune. As noted before, Huntress support may be unable to provide advanced Intune support.
In our example we're using C:\Temp\Intune HTRS Install with two folders, In and Out for the source files and .intunewin file output.
- Download the latest PowerShell Script from our GitHub and save the script locally to your preferred location.
- After downloading both of the files above, open IntuneWinAppUtil.exe and it should open up as seen below:
- Specify the source location of the Huntress PowerShell Script in our case, "C:\Temp\Intune HTRS Install\In"
- Next the setup file will be the name of the PowerShell Script
- Specify the Output folder, in our case, "C:\Temp\Intune HTRS Install\Out"
- For "Do you want to specify catalog folder", enter "N" and press enter which will now create an .intunewin file in your output folder.
- In your Intune portal, navigate to Apps, then All Apps, click the Add button, change the App type to Windows app (Win32) and click Select.
- In the Add App dialog, click Select app package file, then click the blue folder icon, navigate to your previously created .intunewin package and click OK.
- In the App information dialog fill out as much of the information as is relevant for your deployment scenario. Publisher is a required field, we recommend Huntress Labs, Inc. We also recommend you edit the Name to Huntress Agent Install and leave the Show this as a feature app... setting to No. (This is recommended as we'll set it to a required app vs. requiring users to manually install.) Click Next when done.
-
In the Program dialog, fill out all of the below fields matching the example image provided below the copy/paste sections below.
Install command:
powershell.exe -executionpolicy bypass .\InstallHuntress.powershellv2.ps1 -acctkey <your account key> -orgkey <your org key>
Uninstall command:
powershell.exe -executionpolicy bypass .\InstallHuntress.powershellv2.ps1 -uninstall
Install behavior: Leave as System.
Device restart behavior: Change to No specific action.
Return code / Code type: Leave the existing 0 = Success entry and delete the remaining.You MUST replace YOUR_ACCOUNT_KEY with the account key from your Huntress console and provide an appropriate ORGANIZATION_KEY value for your environment otherwise the app install will fail. These keys can be found in the settings menu > download agent section.
Click Next when done
- In the Requirements dialog, fill out the below fields as needed and click Next.
-
In the Detection rules dialog, change the Rules format to Manually configure detection rules and set up the following rules. You can configure each rule by clicking Add and selecting the appropriate type and path/code. The full list of rules are specified in the table below, followed by screenshots of the output once they are all specified.
Rule Type: File Path File or Folder Detection Method Assoc. 32-bit on 64-bot %PROGRAMFILES%\Huntress HuntressAgent.exe File or folder exists No %PROGRAMFILES%\Huntress HuntressUpdater.exe File or folder exists No Rule Type: Registry Key path Value name Detection Method Assoc. 32-bit on 64-bot HKEY_LOCAL_MACHINE\SOFTWARE\Huntress Labs Key exists No HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HuntressAgent Key exists No HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HuntressUpdater Key exists No
Click Next when done.
- Do not make any changes on the Dependencies and Supersedence dialog and click Next.
- In the Assignments tab you will need to select the group/users/devices you wish to have this application deployed to. In this example we've applied it to all devices but this can be granular targeted to a group depending on your setup.
- The only change from default we'd recommend is to Hide all toast notifications as this will prevent Windows notifications informing the user the software has installed. If you wish for end users to see this notification, or for testing purposes, feel free to leave this set to Show all toast notifications.
- Finally, on the Create dialog review all of your previous settings and click the Create button at the bottom of the list.
- Once installed, the endpoint should report this information back to your portal and can be viewed within the Device Install status under the App.
Install .exe via Win32
Another method that you can use is to download the HuntressInstaller.exe package from your portal and wrap this similarly to the PowerShell install.
The primary reason the PowerShell deployment is preferred is that this script always downloads the newest agent from our CDN as well as checking if the application is installed prior to triggering the download or install process. This reduces load on the endpoint, ensures you always install the latest agent, and negates the need to periodically maintain the App deployment with an updated version of the Huntress Installer package from Intune.
Similarly to the Install PowerShell via Win32 App method, you will need to download and install IntuneWinAppUtil from Microsoft's github. In our example we're using C:\Temp\Intune HTRS Install with two folders, In and Out for the source files and .intunewin file output.
-
Download the latest agent from the settings menu and save this in and make note of the Account Key and Organization key.
- Open IntuneWinAppUtil and Specify the source location of the Huntress Agent in our case, "C:\Temp\Intune HTRS Install\In"
- Setup file will be the name of the .exe downloaded from the portal, by default this will match the latest version so for example "0.14.150.exe" but you can rename this as needed such as, "HuntressAgent.exe"
- Specify the Output folder, in our case, "C:\Temp\Intune HTRS Install\Out
- For "Do you want to specify catalog folder", enter "N" and press enter which will now create an .intunewin file in your output folder.
- In your Intune portal, navigate to Apps, then All Apps, click the Add button, change the App type to Windows app (Win32) and click Select.
- In the Add App dialog, click Select app package file, then click the blue folder icon, navigate to your previously created .intunewin package and click OK.
- In the App information dialog fill out as much of the information as is relevant for your deployment.
- In the Program dialog, fill out all of the below fields matching the example image provided below the copy/paste sections below.
Install command:
HuntressInstaller.exe /ACCT_KEY="YOUR_ACCOUNT_KEY" /ORG_KEY="ORGANIZATION _KEY" /S
Uninstall command:
"%PROGRAMFILES%\Huntress\Uninstall.exe" /S
Install behavior: Leave as System.
Device restart behavior: Change to No specific action.
Return code / Code type: Leave the existing 0 = Success entry and delete the remaining.
- In the Detection rules dialog this is the exact same steps for the PowerShell deployment method, follow Step 13 on the previous instructions until completion.