How to Install Zabbix Agent on Windows Server 2025

Zabbix is an enterprise-grade open-source monitoring platform capable of tracking thousands of metrics across servers, network devices, and applications. Deploying Zabbix Agent 2 on Windows Server 2025 is the first step toward centralised visibility into CPU utilisation, disk health, running services, and custom application data. This guide covers the full installation and configuration of Zabbix Agent 2 on Windows Server 2025 — from downloading the installer and configuring the agent configuration file, to opening the necessary firewall ports, registering the host in the Zabbix web UI, linking built-in Windows monitoring templates, and writing custom UserParameter checks for application-specific metrics.

Prerequisites

  • Windows Server 2025 machine where the agent will be installed
  • A running Zabbix Server 7.x or 6.x LTS with the Zabbix web frontend accessible
  • DNS or IP address of the Zabbix Server
  • Administrator privileges on the Windows Server 2025 machine
  • PowerShell 5.1 or later
  • Network connectivity between the Windows host and the Zabbix Server on TCP 10050 (passive) and TCP 10051 (active)

Step 1: Download Zabbix Agent 2 for Windows

Zabbix Agent 2 supersedes the original Zabbix Agent and supports Go plugins for extended monitoring capabilities. Download the x64 MSI installer from the official Zabbix download page:

# Set version and download Zabbix Agent 2 MSI
$zabbixVersion = "7.0.3"
$downloadUrl = "https://cdn.zabbix.com/zabbix/binaries/stable/7.0/$zabbixVersion/zabbix_agent2-$zabbixVersion-windows-amd64-openssl.msi"
$savePath = "C:Tempzabbix_agent2.msi"

New-Item -ItemType Directory -Path "C:Temp" -Force | Out-Null

Invoke-WebRequest -Uri $downloadUrl -OutFile $savePath -UseBasicParsing

Write-Host "Downloaded: $savePath"
Get-Item $savePath | Select-Object Name, Length, LastWriteTime

Step 2: Install Zabbix Agent 2 via MSI

The MSI installer accepts command-line parameters to pre-configure the agent during installation. Provide your Zabbix Server address and the desired hostname for this Windows machine:

# Define configuration values
$zabbixServer       = "192.168.1.200"   # Replace with your Zabbix Server IP
$zabbixServerActive = "192.168.1.200"   # For active checks
$hostName           = "WS2025-PROD-01"  # Unique name that will appear in Zabbix UI
$installDir         = "C:Program FilesZabbix Agent 2"

# Run silent MSI install
Start-Process msiexec.exe -ArgumentList @(
    "/i", $savePath,
    "/qn",
    "SERVER=$zabbixServer",
    "SERVERACTIVE=$zabbixServerActive",
    "HOSTNAME=$hostName",
    "INSTALLLOCATION=`"$installDir`""
) -Wait -NoNewWindow

Write-Host "Installation complete. Checking service status..."
Get-Service -Name "Zabbix Agent 2" | Select-Object Name, Status, StartType

The installer creates the Windows service Zabbix Agent 2 and places the configuration file at C:Program FilesZabbix Agent 2zabbix_agent2.conf.

Step 3: Configure zabbix_agent2.conf

Open the configuration file and verify or update the key parameters. Using PowerShell to view and modify the file:

$confPath = "C:Program FilesZabbix Agent 2zabbix_agent2.conf"

# View current relevant settings
Get-Content $confPath | Where-Object { $_ -match "^(Server|ServerActive|Hostname|LogFile|PidFile|ListenPort)" }

The critical settings in zabbix_agent2.conf are:

### Zabbix Agent 2 Configuration — Key Parameters ###

# Passive check source (Zabbix Server IP or range)
Server=192.168.1.200

# Active check destination (Zabbix Server or Proxy)
ServerActive=192.168.1.200

# This host's unique name as it will appear in Zabbix
Hostname=WS2025-PROD-01

# Log file location
LogFile=C:Program FilesZabbix Agent 2zabbix_agent2.log
LogFileSize=10

# Agent listening port for passive checks
ListenPort=10050

# Timeout for processing checks (seconds)
Timeout=10

# Enable remote commands (set to 1 only if required and secured)
EnableRemoteCommands=0

Apply changes with PowerShell string replacement and restart the service:

$confPath = "C:Program FilesZabbix Agent 2zabbix_agent2.conf"
$content  = Get-Content $confPath -Raw

# Update Server parameter
$content = $content -replace "(?m)^Server=.*$",        "Server=192.168.1.200"
$content = $content -replace "(?m)^ServerActive=.*$",  "ServerActive=192.168.1.200"
$content = $content -replace "(?m)^Hostname=.*$",      "Hostname=WS2025-PROD-01"

Set-Content -Path $confPath -Value $content -Encoding UTF8

# Restart the service to apply changes
Restart-Service -Name "Zabbix Agent 2" -Force
Get-Service -Name "Zabbix Agent 2" | Select-Object Name, Status

Step 4: Configure Windows Firewall Rules

Zabbix uses two TCP ports depending on the check mode:

  • TCP 10050 — Passive checks (Zabbix Server connects inbound to the agent)
  • TCP 10051 — Active checks (Agent connects outbound to Zabbix Server — usually no inbound rule needed on the agent)
# Allow inbound passive checks from Zabbix Server
New-NetFirewallRule `
    -DisplayName "Zabbix Agent 2 - Passive (TCP 10050)" `
    -Direction Inbound `
    -Protocol TCP `
    -LocalPort 10050 `
    -RemoteAddress "192.168.1.200" `
    -Action Allow `
    -Profile Domain,Private `
    -Description "Allows Zabbix Server to collect passive checks"

# Verify rules are active
Get-NetFirewallRule -DisplayName "Zabbix Agent 2*" | 
    Select-Object DisplayName, Direction, Action, Enabled

Step 5: Add the Host in the Zabbix Web UI

Log into the Zabbix web frontend, then navigate to Monitoring → Hosts → Create Host. Fill in the following fields:

  • Host name: WS2025-PROD-01 (must match Hostname in the config file)
  • Visible name: Windows Server 2025 – Production
  • Templates: Windows by Zabbix agent (search in the Templates field)
  • Host groups: Windows servers (or create a new group)
  • Agent interfaces: IP address = 192.168.1.100, Port = 10050

Click Add to save. Within a minute, the host status should turn green if the agent is reachable.

Step 6: Review Monitoring Items and Triggers

The Windows by Zabbix agent template includes pre-configured items and triggers. Key items that will begin collecting immediately:

# Verify agent is responding to test items via zabbix_get (run from Zabbix Server)
# zabbix_get -s 192.168.1.100 -p 10050 -k "system.cpu.util[,user]"
# zabbix_get -s 192.168.1.100 -p 10050 -k "vm.memory.size[available]"
# zabbix_get -s 192.168.1.100 -p 10050 -k "vfs.fs.size[C:,free]"
# zabbix_get -s 192.168.1.100 -p 10050 -k "service.info[Spooler]"
# zabbix_get -s 192.168.1.100 -p 10050 -k "agent.version"

# Check Zabbix Agent 2 log for errors
Get-Content "C:Program FilesZabbix Agent 2zabbix_agent2.log" -Tail 30

Step 7: Configure UserParameters for Custom Checks

UserParameters allow you to extend Zabbix monitoring with custom scripts. Add them to the configuration file and reference them from Zabbix items:

# Add UserParameters to zabbix_agent2.conf
$confPath = "C:Program FilesZabbix Agent 2zabbix_agent2.conf"

$userParams = @"

### Custom UserParameters ###

# Count running IIS application pools
UserParameter=iis.apppools.running,powershell -NoProfile -Command "(Get-WebConfiguration system.applicationHost/applicationPools/add | Where-Object { (Get-WebConfigurationProperty -Filter system.applicationHost/applicationPools/add -Name state -PSPath IIS:AppPools$($_.name)).Value -eq 'Started' }).Count"

# Check if a specific Windows service is running (1=running, 0=stopped)
UserParameter=service.running[*],powershell -NoProfile -Command "if((Get-Service -Name '$1' -ErrorAction SilentlyContinue).Status -eq 'Running'){1}else{0}"

# Get available disk space in MB for a drive letter
UserParameter=disk.free.mb[*],powershell -NoProfile -Command "[math]::Round((Get-PSDrive -Name '$1' -ErrorAction SilentlyContinue).Free/1MB,0)"

# Count current TCP established connections
UserParameter=net.tcp.established,powershell -NoProfile -Command "(Get-NetTCPConnection -State Established -ErrorAction SilentlyContinue).Count"
"@

Add-Content -Path $confPath -Value $userParams

Restart-Service -Name "Zabbix Agent 2" -Force
Write-Host "UserParameters added and service restarted"

After restarting, create matching Zabbix Items in the web UI using these keys (e.g., service.running[wuauserv]) with type Zabbix agent and the appropriate value types.

Conclusion

Zabbix Agent 2 is now fully installed, configured, and communicating with your Zabbix Server from Windows Server 2025. The combination of the built-in Windows by Zabbix agent template and your custom UserParameters gives you broad visibility into system health, service availability, and application-specific metrics from a single monitoring platform. As you expand your environment, you can clone this agent configuration across additional Windows Server 2025 hosts, use Zabbix auto-registration rules to onboard new machines automatically, and take advantage of Zabbix’s built-in trending, SLA reporting, and escalation-based alert routing.