A community where customers and the community can provide feedback to make a better product for everyone! For more details on how we prioritize request, please see:
When reinstalling Zabbix Agent 2, I've noticed that I've had to uninstall and delete the service first. Below is the script I use to install. I'm also specifying a custom .conf and .psk file. The .conf file is specified during the msiexec install, and the .psk file is referenced within the .conf file.
We'd also like to have the Zabbix agent added to the catalogue.
When reinstalling Zabbix Agent 2, I've noticed that I've had to uninstall and delete the service first. Below is the script I use to install. I'm also specifying a custom .conf and .psk file. The .conf file is specified during the msiexec install, and the .psk file is referenced within the .conf file.
:: Stop "Zabbix Agent 2"
sc.exe stop "Zabbix Agent 2"
:: Run powershell script to uninstall zabbix
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy ByPass -File .\uninstall-zabbix_agent2.ps1
:: Delete "Zabbix Agent 2"
sc.exe delete "Zabbix Agent 2"
:: Delete below reg key too, before reinstalling "Zabbix Agent 2"
reg.exe delete "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Application\Zabbix Agent 2" /f
move /y "C:\Program Files\Zabbix Agent 2\zabbix_agent2.conf" "C:\Program Files\Zabbix Agent 2\zabbix_agent2.conf.backup"
move /y "C:\Program Files\Zabbix Agent 2\psk.key" "C:\Program Files\Zabbix Agent 2\psk.key.backup"
mkdir "C:\Program Files\Zabbix Agent 2\"
copy /y zabbix_agent2_psk.conf "C:\Program Files\Zabbix Agent 2\zabbix_agent2_psk.conf"
copy /y psk.key "C:\Program Files\Zabbix Agent 2\psk.key"
start /wait "Install Zabbix Agent" msiexec.exe /i "zabbix_agent2-6.4.4-windows-amd64-openssl.msi" /qn /norestart SERVER=zabbix.example.com SERVERACTIVE=zabbix.example.com CONF="C:\Program Files\Zabbix Agent 2\zabbix_agent2_psk.conf"
## "uninstall-zabbix_agent2.ps1" file contents below
# Search for MSI, then uninstall it.
$MyAppToUninstall = Get-WmiObject -Class Win32_Product | Where-Object{$_.Name -like "*Zabbix*"}
$MyAppToUninstall.Uninstall()
This would be more than awsome!
https://www.zabbix.com/download_agents
Installers are MSI files.