Deploying Huntress with PowerShell

Deploying the Huntress Agent using PowerShell

This PowerShell script (click the link to download the latest version of our PowerShell deployment script from github) will install the Huntress Agent. The script will automatically download the installer from the Huntress servers and run it. The script does basic error checking and logging as well. (It will check to see if the agent is already installed and also verify the installation completed.)

You have the option to hard code your Huntress account key and the organization key in the script or pass either as an argument to the script.

The script supports the following mutually exclusive command-line switches:

  • -reregister - Force the agent to re-register (useful if previously deployed with the incorrect account key)
  • -reinstall - Re-install the agent (useful for "repairing" an agent; this will replace all the files are restart the services)


powershell -executionpolicy bypass -f ./InstallHuntress.powershellv1.ps1 [-acctkey <account_key>] [-orgkey <organization_key>] [-reregister] [-reinstall]

Batch File Wrapper

We have also included a batch file,  InstallHuntress.bat, to be used as a wrapper. This is useful if your RMM/SCCM application does not manage the PowerShell ExecutionPolicy.

You'll need to edit the batch file (found on our github), adding your Huntress account key. Then you can run the batch file as follows:

InstallHuntress.bat <organization_key>