I'm having problems with the syntax of the item i created for a pretty simple powershell command. If I am direclty in powershell on the server it works just find, counts the netstat numbers and sender updates the item. When I put it in the item it does not work. I know its something very simple, I just can't see the error of my ways. Another set of eyes would be great
Item
system.run[powershell $o=(netstat -nao |findstr "3389" |findstr "ESTABLISHED").count;c:\Program Files\Zabbix\zabbix_sender.exe -c c:\zabbix_agentd.conf -k dd_port_count_one_liner -o "$o"",nowait]
powershell command
$o=(netstat -nao| findstr "3389" | findstr "TIME_WAIT").count;c:"Program Files"\Zabbix\zabbix_sender.exe -c c:\zabbix_agentd.conf -k dd_port_count_one_liner -o $o
Item
system.run[powershell $o=(netstat -nao |findstr "3389" |findstr "ESTABLISHED").count;c:\Program Files\Zabbix\zabbix_sender.exe -c c:\zabbix_agentd.conf -k dd_port_count_one_liner -o "$o"",nowait]
powershell command
$o=(netstat -nao| findstr "3389" | findstr "TIME_WAIT").count;c:"Program Files"\Zabbix\zabbix_sender.exe -c c:\zabbix_agentd.conf -k dd_port_count_one_liner -o $o
Comment