PSZabbix icon indicating copy to clipboard operation
PSZabbix copied to clipboard

zabbix 6

Open veepee78 opened this issue 2 years ago • 0 comments

After zabbix 6 update I cannot add computer to a group anymore: PS C:\Windows\system32> Get-ZbxHost mdevweb*

hostid host name status


10129 mdevweb1.m.xo mdevweb1.m.xo Enabled 10130 mdevweb2.m.xo mdevweb2.m.xo Enabled

PS C:\Windows\system32> Get-ZbxHostGroup Maintenance

groupid internal flags name


 14 0        0     Maintenance

PS C:\Windows\system32> Add-ZbxHostGroupMembership -Host (Get-ZbxHost mdevweb*) -HostGroup (Get-ZbxHostGroup Maintenance) Invoke-ZabbixApi : Invalid params. Invalid parameter "/hosts/1": an array is expected. At C:\Program Files\WindowsPowerShell\Modules\PSZabbix\1.2.0\PSZabbix.psm1:494 char:9

  •     Invoke-ZabbixApi $session "host.massadd" $prms | select -Expa ...
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
    • FullyQualifiedErrorId : -32602,Invoke-ZabbixApi

I have 1.2.0 version installed of the scipt and zabbix is version 6.0.1

This worked with 5.4 version of zabbix.

veepee78 avatar Mar 10 '22 09:03 veepee78