Due to the new possibilites Microsoft offers the Linux community, I installed Microsoft PowerShell and Vmware PowerCLI on Debian.
I want Zabbix Proxy to query VMware vCenter via External check.
I created a ps1 script which accepts several copmmand line arguments.
Zabbix wraps each argument in quotation marks, but PowerShell can't interpret arguments in quotation marks.
Steps to reproduce:
- Create an Item of Type "External check"
- Create the Key. Can be Any Key with script name and at least 1 Parameter. For example:
- Set Debug Log to Level 4
Zabbix puts quotation marks around any argument:
These arguments won't get parsed in the script.
The String should be created as following:
I need Zabbix to let the Admin choose, if the arguments are put in quotation marks or not.
I solved it, by calling a Linux Bash Script first, which accepts five arguments and parses the arguments to the powershell script without quotation marks: