Nightfall Windows Agent Deployment: MSI

This guide explains multiple ways to deploy the Nightfall Agent (NightfallAgent.msi) with the required API_KEY and COMPANY_ID parameters.

We cover:

Assumptions

  • You have the MSI installer (NightfallAgent.msi) provided by Nightfall.

  • Installation requires two properties:

    • API_KEY="YOUR-API-KEY"

    • COMPANY_ID="YOUR_SECRET_VALUE"

  • Installation is silent (/qn /norestart) and requires administrator rights.

  • Logging is enabled with /l*v for troubleshooting.

PowerShell: Local MSI (already copied to the machine)

Use this if you or your RMM tool place the .msi directly on the machine before running the script.

# Install-NightfallAgent-Local.ps1

$msiPath   = "C:\Temp\NightfallAgent.msi"
$apiKey    = "REPLACE_WITH_API_KEY"
$companyId = "REPLACE_WITH_COMPANY_ID"

$logDir = "C:\Windows\Temp\Nightfall"
$logFile = Join-Path $logDir "NightfallAgent_Install.log"

New-Item -ItemType Directory -Path $logDir -Force | Out-Null

if (Test-Path $msiPath) {
    Write-Output "MSI found at $msiPath. Starting install..."
    $args = "/i `"$msiPath`" API_KEY=`"$apiKey`" COMPANY_ID=`"$companyId`" /qn /norestart /l*v `"$logFile`""
    $proc = Start-Process "msiexec.exe" -ArgumentList $args -Wait -PassThru -NoNewWindow
    if ($proc.ExitCode -eq 0) {
        Write-Output "Nightfall agent installed successfully."
    } else {
        Write-Output "Installer returned exit code $($proc.ExitCode). Check log: $logFile"
        exit $proc.ExitCode
    }
} else {
    Write-Output "MSI not found at $msiPath. Skipping install."
    exit 2
}

PowerShell: Install from a Network Share

Use this if you keep the MSI on a file server. Make sure Domain Computers or the target machines have read access to the share.

⚠️ Use UNC paths (\\server\share\...) — mapped drives won’t work for GPO Startup scripts.

PowerShell: Download MSI from a URL

Use this if you host the MSI on an internal HTTPS server or CDN.

GPO Deployment via Startup Script

Recommended for domain-joined Windows machines. Use a Startup Script because the built-in “Software Installation” GPO cannot pass custom properties like API_KEY.

Steps:

  1. Place the script (e.g., Install-NightfallAgent-FromShare.ps1) in

    \\<domain>\SYSVOL\<domain>\scripts\Nightfall\

  2. Ensure Domain Computers have read access.

  3. In Group Policy Management:

    • Go to Computer Configuration → Policies → Windows Settings → Scripts (Startup/Shutdown).

    • Add a Startup Script.

      • Script name: powershell.exe

      • Script parameters: -ExecutionPolicy Bypass -File "\\SYSVOL<domain>\scripts\Nightfall\Install-NightfallAgent-FromShare.ps1"

  4. Apply the GPO to the desired OU.

  5. Run gpupdate /force or reboot a target machine.

GPO Software Installation with MST (Advanced)

If you have an MST transform that embeds API_KEY and COMPANY_ID, you can deploy the MSI via:

Computer Configuration → Policies → Software Settings → Software installation.

  • Add the MSI via UNC path.

  • Open its Properties → Modifications → Add your .mst.

Without an MST, use GPO via Startup Script instead. One-liner for Testing

One-liner for Testing

Run manually on a single machine (PowerShell elevated):

Verification After Install

  • Check for expected services:

  • Confirm presence of the Nightfall AI icon in the system tray (this may take a few seconds).

    • Double click the icon

    • You should see a connected status as seen in the image above.

Uninstalling The Nightfall AI Agent

Last updated

Was this helpful?