Commit 1311e390 by Rinat K. Nugaev

Replace install Zabbix command to New-Service command...

parent d3edc1d6
......@@ -84,7 +84,8 @@ HostMetadataItem=system.uname
Add-Content -Value "$confcont" -Path $ZabbixConf
#Installing zabbix agent as a service
& "c:\Program Files\Zabbix\bin\win64\zabbix_agentd.exe" --config "c:\Program Files\Zabbix\conf\zabbix_agentd.conf" --install
New-Service -Name "Zabbix Agent" -BinaryPathName '"C:\Program Files\Zabbix\bin\win64\zabbix_agentd.exe" --config "C:\Program Files\Zabbix\conf\zabbix_agentd.conf"' `
-DisplayName "Zabbix Agent" -Description "Provides system monitoring" -StartupType "Automatic" -ErrorAction SilentlyContinue
#Starting zabbix agent
Get-service -name "Zabbix Agent" | start-service
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment