I have a powershell script on a windows machine, which simply displays the value of the variable write-host 10. A simple line. To do this, I prescribe a zabbiks agent: UserParameter = fileserv.folder1 [*], powershell.exe -nologo C: \ scripts \ CheckDFS.ps1 $ 1

And how can I remove the second value, if I write an additional write-host in the script 20 What do I need to add in the agent zabbiksa and how to correctly write in powershell script? Thank.

  • no one here is responding. scored whether the case in other sections .. - Oleg Zolotarenko

1 answer 1

The script that runs through the UserParameter must return one value. If your script returns multiple values, then use the zabbix_sender call inside the script as a workaround, and the script itself should return 0 if completed without errors.

On the zabbix server, make an additional data item of the zabbix trapper type and accept the results of the script operation there.