Hello
I have problem with powershell script.
I create
UserParameter=vm.state,powershell.exe -NoProfile -ExecutionPolicy Bypass -file "c:\Zabbix\rep.ps1" on zabbix config and create item : system.run[powershell.exe -NonInteractive "C:\Zabbix\rep.ps1"]
and triggers
{Hyper_V_Template:system.run[powershell.exe -NonInteractive "C:\Zabbix\rep.ps1"].prev(0)}=1
In the end I enable item and I get zabbix not supported.
Any idea why won't work??
I have problem with powershell script.
Code:
$Health = Get-VMReplication | Select-Object Name, State, Health
foreach($State in $Health){
if($state.Health -match "Normal"){
$output = 0
}else{
$output = 1
}
}
write-host $output
UserParameter=vm.state,powershell.exe -NoProfile -ExecutionPolicy Bypass -file "c:\Zabbix\rep.ps1" on zabbix config and create item : system.run[powershell.exe -NonInteractive "C:\Zabbix\rep.ps1"]
and triggers
{Hyper_V_Template:system.run[powershell.exe -NonInteractive "C:\Zabbix\rep.ps1"].prev(0)}=1
In the end I enable item and I get zabbix not supported.
Any idea why won't work??