Skip to main content

How to Install Bitdefender GravityZone Using a Command Template in Swif

Overview

Swif provides a pre-built Command Template for deploying Bitdefender GravityZone endpoint security across your managed devices. This template demonstrates the package unpacking installation pattern — downloading the Bitdefender installer package, extracting it, and running the installation silently. Templates are available for both macOS and Windows.

Using a command template saves time by pre-filling the installation script with the correct commands, so you only need to supply your GravityZone-specific parameters (such as your installer package URL or deployment key).

Prerequisites

Before you begin, ensure you have:

  • Swif Admin access to your organization's Swif console

  • Bitdefender GravityZone account with access to the Packages section

  • Your GravityZone installer download link (obtained from the GravityZone console under Network → Packages)

  • Devices enrolled in Swif

Step 1: Get Your Bitdefender GravityZone Installer Link

  1. Log in to your Bitdefender GravityZone console.

  2. Navigate to Network → Packages.

  3. Select or create an installation package configured for your organization's needs (modules, scan mode, etc.).

  4. Click Send download links or copy the installer download URL for the appropriate OS (macOS or Windows).

Tip: For macOS, the installer is typically a .dmg containing a .pkg or a compressed archive. For Windows, it is usually an .exe installer.

Step 2: Create a Command from the Bitdefender Template

  1. In the Swif console, go to Device Management → Commands.

  2. Click Create Command.

  3. In the Command Templates panel, select the Bitdefender – Package Unpack/Install template.

  4. Choose the OS(es) you want to deploy to:

    • macOS — for Mac endpoints

    • Windows — for Windows endpoints

    • You can configure both or skip one using Save & Continue / Skip

Step 3: Configure the macOS Command Script

The macOS template uses the package unpacking pattern. Below is the general structure of the command:

# ============================================================
# Bitdefender GravityZone Installer – Windows (Silent Install)
# ============================================================
# This script downloads the Bitdefender BEST installer and
# runs it silently with the GravityZone deployment key.
# ============================================================

# Step 1: Download the Bitdefender installer
$installerUrl = "YOUR_GRAVITYZONE_DOWNLOAD_URL"
$installerPath = "$env:TEMP\setupdownloader_[aHR0cHM6Ly9YOUR_KEY].exe"

Invoke-WebRequest -Uri $installerUrl -OutFile $installerPath

# Step 2: Run the installer silently
Start-Process -FilePath $installerPath -ArgumentList "/quietinstall" -Wait -NoNewWindow

# Step 3: Clean up
Remove-Item -Path $installerPath -Force

Write-Output "Bitdefender GravityZone installation complete."
exit 0

What to customize:

  • Replace YOUR_GRAVITYZONE_DOWNLOAD_URL with the download link from your GravityZone console.

  • Adjust the volume name (/Volumes/Bitdefender) and .pkg filename to match your specific package.

Step 4: Configure the Windows Command Script

The Windows template downloads and silently installs the Bitdefender endpoint agent:

$installerUrl = "YOUR_GRAVITYZONE_DOWNLOAD_URL"
$installerPath = "$env:TEMP\bitdefender_setup.exe"

Invoke-WebRequest -Uri $installerUrl -OutFile $installerPath
Start-Process -FilePath $installerPath -ArgumentList "/silent" -Wait
Remove-Item $installerPath

Start-Process -FilePath $installerPath -ArgumentList "/silent" -Wait -PassThru | Tee-Object -Variable proc | Out-Null
if ($proc.ExitCode -eq 0) {
Write-Output "Installation completed successfully."
} else {
Write-Output "Installation failed with exit code $($proc.ExitCode)."
}

What to customize:

  • Replace YOUR_GRAVITYZONE_DOWNLOAD_URL with the Windows installer link from GravityZone.

  • The /silent flag ensures silent deployment with no user interaction.

Step 5: Save and Deploy

  1. After customizing the script(s), click Save & Continue for each OS.

  2. Review the command summary and click Create.

  3. To deploy, go to Commands, select your new Bitdefender command, and choose the target devices or device groups.

  4. Click Run Command.

The installation will be queued and executed once the device connects to the internet.

Validation

After deployment, you can verify the installation:

macOS:

# Check if Bitdefender is installed 

ls /Library/Bitdefender/

Windows:

# Check if Bitdefender service is running 

Get-Service -Name "EPSecurityService" | Select-Object Status, DisplayName

Troubleshooting

Issue

Solution

Download fails

Verify the GravityZone URL is correct and accessible from the device. Check if a firewall or proxy is blocking the download.

Permission denied (macOS)

Ensure the command runs with admin privileges. Swif commands run as root by default on macOS.

Installer not found in DMG

Mount the DMG manually and check the exact volume name and .pkg filename, then update the script.

Silent install flag not working (Windows)

Confirm you are using the correct installer type from GravityZone. The full kit installer supports /quietinstall.

Related Articles

Last updated: July 2026

Did this answer your question?