Skip to content

Execute Bat File on Remote Windows Host with Zabbix Agent

Video Lecture

Execute Bat File on Remote Windows Host with Zabbix Agent Execute Bat File on Remote Windows Host with Zabbix Agent

 (Pay Per View)

You can use PayPal to purchase a one time viewing of this video for $1.49 USD.

Pay Per View Terms

  • One viewing session of this video will cost the equivalent of $1.49 USD in your currency.
  • After successful purchase, the video will automatically start playing.
  • You can pause, replay and go fullscreen as many times as needed in one single session for up to an hour.
  • Do not refresh the browser since it will invalidate the session.
  • If you want longer-term access to all videos, consider purchasing full access through Udemy or YouTube Memberships instead.
  • This Pay Per View option does not permit downloading this video for later viewing or sharing.
  • All videos are Copyright © 2019-2025 Sean Bradley, all rights reserved.

Description

In this video, I create a Windows batch file that backups a file. I then execute it and read the response from the remote Zabbix Agent host using the system.run item key.

example.bat

1
2
3
4
5
6
@echo off
set d=%date%_%time%
set d=%d:.=%
set d=%d::=%
set d=%d:/=%
COPY c:\temp\abc.txt c:\temp\abc_%d%.txt >nul && (echo 1) || (echo 0)

Item

Property Value
Name Backup Example
Type Zabbix agent (active)
Key system.run[C:/temp/example.bat]

Zabbix Agent Items

Restricting Agent Checks