I don't know if I do something wrong with PowerShell ExecutionPolicy or where is the mistake.
I have installed Zabbix Agent on my server BRN-APL-02 and here is part of configuration :
UserParameter=test,powershell -NoProfile -ExecutionPolicy Bypass -File "C:\Program Files\Zabbix Agent\scripts\script.ps1"
I have all my Powershell scripts signed! My server is in a domain with settings ExecutionPolicy in scope MachinePolicy to AllSigned (Allow only signed scripts).
If I run command script.ps1 on the BRN-APL-02 server everything is OK. It works.
But when I want to get userparameter from Zabbix server there is an error
zabbix@Zabbix:~$ zabbix_get -s BRN-APL-02 -k test
ZBX_NOTSUPPORTED: Timeout while executing a shell script.
It is not problem of timeout. I have set option Timeout=30
When I change Executionpolicy and Scope Machinepolicy in domain to Allow local scripts and remote signed scripts, then command works. But this is not really solution.
Where could be a problem? Thanks
I have installed Zabbix Agent on my server BRN-APL-02 and here is part of configuration :
UserParameter=test,powershell -NoProfile -ExecutionPolicy Bypass -File "C:\Program Files\Zabbix Agent\scripts\script.ps1"
I have all my Powershell scripts signed! My server is in a domain with settings ExecutionPolicy in scope MachinePolicy to AllSigned (Allow only signed scripts).
If I run command script.ps1 on the BRN-APL-02 server everything is OK. It works.
But when I want to get userparameter from Zabbix server there is an error
zabbix@Zabbix:~$ zabbix_get -s BRN-APL-02 -k test
ZBX_NOTSUPPORTED: Timeout while executing a shell script.
It is not problem of timeout. I have set option Timeout=30
When I change Executionpolicy and Scope Machinepolicy in domain to Allow local scripts and remote signed scripts, then command works. But this is not really solution.
Where could be a problem? Thanks
Comment