- 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
- 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
## 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.
-`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 emove all remnants of Zabbix Agent and Zabbix Agent 2.
-`RemoveZabbix.ps1`: Script to remove all remnants of Zabbix Agent and Zabbix Agent 2.
## Usage
## 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.
2. Download and run `RemoveZabbix.ps1` to remove all remnants of Zabbix Agent and Zabbix Agent 2.
## Prerequisites
## Prerequisites
...
@@ -20,49 +20,72 @@ This repository contains scripts to
...
@@ -20,49 +20,72 @@ This repository contains scripts to
### Via an automatic One-Liner, that Downloads, installs and clean up
### Via an automatic One-Liner, that Downloads, installs and clean up
This one-liner download and install does the following:
This one-liner download and install does the following:
1. Sets the ExecutionPolicy
1. Sets the ExecutionPolicy
2. Stop the "Zabbix Agent 2" service.
2. Stops the "Zabbix Agent 2" service.
3. Set the path where to store the script.
3. Sets the path where to store the script.
4. Download the script file to the path.
4. Downloads the script file to the path.
5. Create a scheduled task.
5. Creates a scheduled task.
6. Starts the newly created 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:
```powershell
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: