Deploying the Huntress Agent using PowerShell
This PowerShell script 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.
Version 2 of our PowerShell script introduces a rewrite for more robust installation, better commented code, better logging, and coming soon: Agent Tags.
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. Highly recommended to run this script as Admin.
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, orphaned agent, or performing a full repair)-reinstall
- Re-install the agent (useful for a quick repair of an agent)
Usage:
powershell -executionpolicy bypass -f ./InstallHuntress.powershellv1.ps1 [-acctkey <account_key>] [-orgkey <organization_key>]
Notes:
Replace the <account_key> and <organization_key> with your Account and Organization Keys
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
Comments
0 comments
Please sign in to leave a comment.