- Check if Zabbix Agent 2 is running or not, if not copy the configuration file from the network and replace it in the installation folder and start up the Zabbix Agent 2 service
- Remove all remnants of Zabbix Agent and Zabbix Agent 2
- Check if Zabbix Agent 2 is running or not, if not copy the configurartion file from the network and replace it in the installation folder and start up the Zabbix Agent 2 service
## Files
-`CheckAndStartZabbixAgent2.ps1`: Script to check if Zabbix Agent 2 is running or not, if not then copy the configurartion file from the network and replace it in the installation folder and start the Zabbix Agent 2 service.
-`RemoveZabbix.ps1`: Script to emove all remnants of Zabbix Agent and Zabbix Agent 2.
-`CheckAndStartZabbixAgent2.ps1`: Script to check if Zabbix Agent 2 is running or not, if not then copy the configuration file from the network and replace it in the installation folder and start the Zabbix Agent 2 service.
-`RemoveZabbix.ps1`: Script to remove all remnants of Zabbix Agent and Zabbix Agent 2.
## Usage
1. Download `CheckAndStartZabbixAgent2.ps1` and create a new scheduled task run run this regurarly.
1. Download `CheckAndStartZabbixAgent2.ps1` and create a new scheduled task to run this regularly.
2. Download and run `RemoveZabbix.ps1` to remove all remnants of Zabbix Agent and Zabbix Agent 2.
## Prerequisites
...
...
@@ -20,49 +20,72 @@ This repository contains scripts to
### Via an automatic One-Liner, that Downloads, installs and clean up
This one-liner download and install does the following:
1. Sets the ExecutionPolicy
2. Stop the "Zabbix Agent 2" service.
3. Set the path where to store the script.
4. Download the script file to the path.
5. Create a scheduled task.
1. To run the script, you need to temporarily change the PowerShell execution policy to allow script execution. You can do this by using the following one-liner code:
To download, save, and execute the script, you need to temporarily change the PowerShell execution policy to allow script execution. You can do all this by using the following one-liner code in an elevated PowerShell session: