Hey all,
This seems simple, but has been eluding me. I have tried various things, but can't seem to get it working.
I have some custom User Parameters defined in my Agent config file. These parameters are calling Windows Powershell scripts that I created, and that are located inside the Zabbix installation folder. The path to this folder has a space in it, though. So when I try to call these scripts, I get an error back - it seems that the space in the path is tripping up Powershell.
Installation path (space in two places, "Program Files" and "Zabbix Agent"):
Example UserParameter in the config file:
Command and resulting error:
This seems simple, but has been eluding me. I have tried various things, but can't seem to get it working.
I have some custom User Parameters defined in my Agent config file. These parameters are calling Windows Powershell scripts that I created, and that are located inside the Zabbix installation folder. The path to this folder has a space in it, though. So when I try to call these scripts, I get an error back - it seems that the space in the path is tripping up Powershell.
Installation path (space in two places, "Program Files" and "Zabbix Agent"):
"C:\Program Files\Zabbix Agent\scripts\Testing\testParams3.ps1"
UserParameter=test.testParams_ps,powershell -noninteractive "C:\Program Files\Zabbix Agent\scripts\Testing\testParams3.ps1"
C:\Users\Blah> zabbix_get -s 127.0.0.1 -k test.testParams_ps
C:\Program : The term 'C:\Program' is not recognized as the name of a cmdlet, ...
C:\Program : The term 'C:\Program' is not recognized as the name of a cmdlet, ...
Comment