I stand corrected Richlv, I got the sender to send multiple line values from my powershell script. The syntax is still a bit confusing though. It doesn't clearly state how to get the host name from the conf file. It talks about it in the last example but it should explain it better than just an example. Also, the bit about getting sender to use stdin is sort of confusing. The order of the switches also appears to matter. Here's the only way I could get sender to use the conf file for all info and send a multi-line value (at the powershell prompt):
.\zabbix_sender.exe -c zabbix_agentd.conf - -T -k trapperTest -o ($Result)
Would be a bit less confusing if when specifying a config file and no "-h" option, sender would default to the hostname in the config...
Ok - All of this brings me back to my original post. I've been able to use user parameters to cover most of the scripts I need to run, but there are a few that still need additional time to process and I don't want to resort to using the Windows Task Schedular or a 3rd party tool. Zabbix schedules things all the time (so to speak) - this should work.
So, I tried using an item with system.run to run the script in question (with the nowait switch) and the script can use sender (which now works as I'd like) to send the result back to another key. There ya go! I scheduled the script with Zabbix! Only.... Now I find out that system.run doesn't work on an agent that is purely using active checks. Darn.
Based on other threads I've found, it looks like this functionality has been requested but isn't on the short list, which is unfortunate. However - consider the following: Add that "nowait" option to user parameters. We'd still
have to use sender to get data back into Zabbix, but at least we'd be able to execute longer running scripts without having to use yet another task scheduler.