Skip to main content

How to Install Huntress on Windows Using the Swif App Template

Deploy the Huntress agent to managed Windows devices with the Huntress app template in Swif.

The Huntress app template in Swif deploys the Huntress agent to your managed Windows devices. It uses Huntress's official PowerShell deployment script, InstallHuntress.powershellv2.ps1, which downloads the latest Huntress installer and installs it silently. You don't need to download or upload the Huntress installer yourself.


Prerequisites

Item

Details

Windows devices

Enrolled in Swif

Huntress Account Key

Your Huntress account's 32-character key, from your Huntress portal

Organization Key

The key for the Huntress organization you're deploying to, such as your-org-name

For where to find your keys, see Huntress's guide, Install the Huntress Agent for Windows OS.


Set up Huntress with the app template

  1. In Swif, go to Device Management > Applications, and select the Windows tab.

  2. Click View All Templates, or scroll through the template carousel, and find Huntress. Click Configure, and select for Windows.

The template opens as a four-step wizard: Basic information, Validation rules, Device assignments, and Review.

Step 1: Basic information

Most fields are already filled in, including the Installer File, InstallHuntress.powershellv2.ps1. Complete the Installer Arguments.

Enter each option, and each value, on its own line, without quotes:

-acctkey
<Your Account Key>
-orgkey
<Your Organization Key>
-reregister

Replace <Your Account Key> and <Your Organization Key> with your keys. Keep -reregister. See Why -reregister is needed below.

To add tags, which Huntress uses to group agents, add two more lines: -tags, then your tags.

The template checks your entries. You can't continue if:

  • the placeholders, such as <Your Account Key>, haven't been replaced

  • the Account Key isn't exactly 32 letters and numbers

  • an option and its value are on the same line, such as -acctkey abc123…

  • the arguments use the format of Huntress's .exe installer, such as /ACCT_KEY=…

Spaces and line breaks around your keys are removed automatically. Post-Install Command Script stays empty.

Click Continue.

Step 2: Validation rules

The template checks that C:\Program Files\Huntress\HuntressAgent.exe exists on the device. Keep this rule.

Don't remove the validation rule. Huntress's deployment script reports success whether or not the agent installed. Checking for HuntressAgent.exe is the only reliable way for Swif to confirm Huntress is installed.

Click Continue.

Step 3: Device assignments

Select the Windows devices or device groups to deploy Huntress to, then click Continue.

Step 4: Review

Check your settings, and click Finish.

Swif adds Huntress to your Windows Applications list, and installs it on the assigned devices.


How it works

  1. Swif runs Huntress's deployment script on each device, with PowerShell, using your Installer Arguments.

  2. The script downloads the latest Huntress installer, and installs the agent with your keys.

  3. Swif checks for HuntressAgent.exe, and reports Huntress as installed.

Why -reregister is needed

If an earlier Huntress install stopped partway, it can leave files in C:\Program Files\Huntress. Without -reregister, the script finds them, assumes Huntress is already installed, and stops without installing the agent. With -reregister, it installs and registers the agent anyway.


Use Huntress's .exe installer instead

If you'd rather use Huntress's own installer:

  1. Download HuntressInstaller.exe from your Huntress portal.

  2. In the template, or in the Huntress app in Swif, upload it as the Installer File, instead of the PowerShell script.

  3. Enter the Installer Arguments in the .exe format, on one line:

    /ACCT_KEY=<Your Account Key> /ORG_KEY=<Your Organization Key> /S

    To add tags, add /TAGS=<Your Tags> before /S.

When you upload the .exe, the guidance below Installer Arguments changes to show this format.


Verify the installation

  • In Swif: open the Huntress app in Device Management > Applications, and check that devices show it as installed.

  • On the device: check that C:\Program Files\Huntress\HuntressAgent.exe exists, and that the Huntress Agent service is running.

  • In Huntress: check that the device appears in your Huntress portal, in the right organization.


Troubleshooting

"Invalid AccountKey specified (incorrect length)"

The Installer Arguments are in the .exe format, such as /ACCT_KEY=…, but the Installer File is the PowerShell script. The script reads the whole /ACCT_KEY=… text as the key, so it's too long.

  1. In Swif, go to Device Management > Applications, open Huntress (Windows), and click Edit.

  2. Keep InstallHuntress.powershellv2.ps1 as the Installer File.

  3. Replace the Installer Arguments with each option and value on its own line:

    -acctkey
    <Your Account Key>
    -orgkey
    <Your Organization Key>
    -reregister
  4. Save. Devices try the install again when they next check in.

Huntress stays "Awaiting installation"

  • Check that the Installer Arguments include -reregister. Without it, files left by an earlier install can stop the script before it installs the agent.

  • Check that the validation rule for C:\Program Files\Huntress\HuntressAgent.exe is still there.

  • Check that your Account Key and Organization Key are correct, in your Huntress portal.

Swif says Huntress is installed, but it isn't in the Huntress portal

Check the Organization Key. If it's wrong, the agent may be registered to a different Huntress organization.

I can't continue past Basic information

Check the Installer Arguments against the list under The template checks your entries. The most common causes are a placeholder that wasn't replaced, or an option and its value on the same line.


Related resources

Did this answer your question?