reconf service using only cmd
Fixing Zabbix on a bunch of Windows machines with local accounts
for /F "tokens=1-3 delims=," %%A in (zz.list) do (
echo %%A %%B %%C
net use "\\%%A.mydomain.com\C$" %%C /user:%%A\%%B
xcopy /q /y zabbix_agentd.win.conf "\\%%A.mydomain.com\C$\Program Files (x86)\Zabbix Agent\zabbix_agentd.conf"
net use "\\%%A.mydomain.com\C$" /delete
net use "\\%%A.mydomain.com\IPC$" %%C /user:%%A\%%B
sc \\%%A.mydomain.com stop "Zabbix Agent"
sc \\%%A.mydomain.com start "Zabbix Agent"
net use "\\%%A.mydomain.com\IPC$" /delete
)
and HostnameItem=system.hostname[host]
in conf