I feel like I have to be missing something painfully obvious here. I've got some eventlog items setup and working great. However, I want a trigger action to run a Powershell script on the host. I for the life of me can't figure out how to format it so Zabbix is properly handling the path. This works when directly run on the host:
powershell.exe -ExecutionPolicy Unrestricted -file "C:\Program Files\Zabbix Agent 2\zabbix_scripts\mytestscript.ps1"
I've tried enclosing the whole thing in both single quotes and double quotes. I've tried escaping just the double quotes or both the double quotes and the backslashes. It launches Powershell (as far as I can tell), but the path to the script isn't being passed correctly so it just errors out saying the file doesn't exist. Running Zabbix 6.4.1.
powershell.exe -ExecutionPolicy Unrestricted -file "C:\Program Files\Zabbix Agent 2\zabbix_scripts\mytestscript.ps1"
I've tried enclosing the whole thing in both single quotes and double quotes. I've tried escaping just the double quotes or both the double quotes and the backslashes. It launches Powershell (as far as I can tell), but the path to the script isn't being passed correctly so it just errors out saying the file doesn't exist. Running Zabbix 6.4.1.
Comment