Team: Huntress EDR
Product: Powershell
Environment: Windows Server 2008 and newer, Windows Vista and newer
Summary: Automated Huntress agent deployment via Powershell (scripts)
Deploying the Huntress Agent using PowerShell
This PowerShell script will install the Huntress Agent. The script will automatically download the newest installer from the Huntress servers and run it. 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. This script should be run as Admin.
If you've previously used our legacy script v1, please make sure you update all your scripts to v2 (InstallHuntress.powershellv2.ps1) so you can take advantage of all the new features (new batch file wrapper too!).
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)-uninstall
- Uninstalls the agent aggressively, useful for agents struggling to uninstall normally.
Usage:
powershell -executionpolicy bypass -f ./InstallHuntress.powershellv2.ps1 [-acctkey <account_key>] [-orgkey <organization_key>] [-tags <comma_separated_tags>] [-reregister] [-reinstall] [-uninstall]
Notes:
Replace the <account_key> and <organization_key> with your Account and Organization Keys
Example:
powershell -executionpolicy bypass -f ./InstallHuntress.powershellv2.ps1 -acctkey
"your_account_key_here" -orgkey "organization_name_here" -tags "production, USWest"
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 or pass parameters.
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> <optional_tags>
Comments
0 comments
Please sign in to leave a comment.