< Back

Set-ZabbixItem

Sun Jan 19, 2020 6:15 pm

NAME Set-ZabbixItem



SYNOPSIS

Set item properties





SYNTAX

Set-ZabbixItem [[-applicationid] <Array>] [[-status] <String>] [[-itemid] <String>] [[-jsonrpc] <String>]

[[-session] <String>] [[-id] <String>] [[-URL] <String>] [<CommonParameters>]





DESCRIPTION

Set item properties





PARAMETERS

-applicationid <Array>



Required? false

Position? 1

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-status <String>

status: 0 (enabled), 1 (disabled)



Required? false

Position? 2

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-itemid <String>



Required? false

Position? 3

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-jsonrpc <String>



Required? false

Position? 4

Default value ($global:zabSessionParams.jsonrpc)

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-session <String>



Required? false

Position? 5

Default value ($global:zabSessionParams.session)

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-id <String>



Required? false

Position? 6

Default value ($global:zabSessionParams.id)

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-URL <String>



Required? false

Position? 7

Default value ($global:zabSessionParams.url)

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Get-ZabbixItem -TemplateID (Get-ZabbixTemplate | ? name -match "template").templateid | Set-ZabbixItem

-status 1



Disable items in the template(s)









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Get-ZabbixItem -TemplateID (Get-ZabbixTemplate | ? name -match "template").templateid | sort name | select

itemid,name,status | ? name -match name | select -first 1 | Set-ZabbixItem -status 0 -verbose



Enable items in the template









-------------------------- EXAMPLE 3 --------------------------



PS C:\\>Get-ZabbixItem -TemplateID (Get-ZabbixTemplate | ? name -match "template").templateid | sort name | select

itemid,name,status | ? name -match name | ? status -match 0 | Set-ZabbixItem -status 1



Disable items in the template









-------------------------- EXAMPLE 4 --------------------------



PS C:\\>Get-ZabbixItem -TemplateID (Get-ZabbixTemplate | ? name -match "template").templateid | sort name | ? name

-match name | Set-ZabbixItem -applicationid (Get-ZabbixApplication | ? name -match "application").applicationid

-verbose



Set application(s) for the items









-------------------------- EXAMPLE 5 --------------------------



PS C:\\>Get-ZabbixHost | ? name -match "host" | Get-ZabbixItem | ? key_ -match "key" | ? status -match 0 | select

hostid,itemid,key_,status | sort hostid,key_ | Set-ZabbixItem -status 1



Disable host items (set status to 1)











RELATED LINKS