< Back

Get-ZabbixHostGroup

Sun Jan 19, 2020 6:10 pm

NAME Get-ZabbixHostGroup



SYNOPSIS

Get host group





SYNTAX

Get-ZabbixHostGroup [[-GroupName] <Object>] [[-GroupID] <Object>] [[-jsonrpc] <String>] [[-session] <String>]

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





DESCRIPTION

Get host group





PARAMETERS

-GroupName <Object>

Filter by name of the group



Required? false

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-GroupID <Object>

Filter by id of the group



Required? false

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-jsonrpc <String>



Required? false

Position? 3

Default value ($global:zabSessionParams.jsonrpc)

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-session <String>



Required? false

Position? 4

Default value ($global:zabSessionParams.session)

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-id <String>



Required? false

Position? 5

Default value ($global:zabSessionParams.id)

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-URL <String>



Required? false

Position? 6

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-ZabbixHostGroup



Get host groups









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



PS C:\\>(Get-ZabbixHostGroup -GroupName somegroup).hosts



Get hosts from host group (case sensitive)









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



PS C:\\>(Get-ZabbixHostGroup | ? name -match somegroup).hosts



Get host group and hosts (case insensitive)









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



PS C:\\>Get-ZabbixHostGroup | ? name -match somegroup | select name -ExpandProperty hosts | sort host | ft -a



Get host group and it's hosts









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



PS C:\\>Get-ZabbixHostGroup -GroupID 10001 | select name -ExpandProperty hosts



Get group and it's hosts









-------------------------- EXAMPLE 6 --------------------------



PS C:\\>Get-ZabbixHostGroup | ? name -match templates | select -ExpandProperty templates



Get group of templates











RELATED LINKS