< Back
Get-ZabbixTemplate
Post
NAME Get-ZabbixTemplate
SYNOPSIS
Get templates
SYNTAX
Get-ZabbixTemplate [[-TemplateName] <Array>] [[-TemplateID] <Array>] [[-HostID] <Array>] [[-hostids] <Array>]
[[-parentTemplates] <Array>] [[-jsonrpc] <String>] [[-session] <String>] [[-id] <String>] [[-URL] <String>]
[<CommonParameters>]
DESCRIPTION
Get templates
PARAMETERS
-TemplateName <Array>
To filter by name of the template (case sensitive)
Required? false
Position? 1
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-TemplateID <Array>
To filter by id of the template
Required? false
Position? 2
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-HostID <Array>
Required? false
Position? 3
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-hostids <Array>
Required? false
Position? 4
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-parentTemplates <Array>
Required? false
Position? 5
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-jsonrpc <String>
Required? false
Position? 6
Default value ($global:zabSessionParams.jsonrpc)
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-session <String>
Required? false
Position? 7
Default value ($global:zabSessionParams.session)
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-id <String>
Required? false
Position? 8
Default value ($global:zabSessionParams.id)
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-URL <String>
Required? false
Position? 9
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-ZabbixTemplate
Get all templates
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Get-ZabbixTemplate | select name,hosts
Get templates and hosts
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Get-ZabbixTemplate -TemplateName "Template OS Windows"
Get template by name (case sensitive)
-------------------------- EXAMPLE 4 --------------------------
PS C:\\>Get-ZabbixTemplate | ? name -match OS | select templateid,name -Unique
Get template by name (case insensitive)
-------------------------- EXAMPLE 5 --------------------------
PS C:\\>Get-ZabbixTemplate | ? {$_.hosts.host -match "host"} | select templateid,name
Get templates linked to host by hostname
-------------------------- EXAMPLE 6 --------------------------
PS C:\\>Get-ZabbixTemplate | ? name -eq "Template OS Linux" | select -ExpandProperty hosts | select
host,jmx_available,*error* | ft -a
Get hosts status per template
-------------------------- EXAMPLE 7 --------------------------
PS C:\\>Get-ZabbixTemplate "Template OS Linux" | select -pv templ | select -ExpandProperty hosts | select
@{n='Template';e={$templ.name}},Name,Status,Error
Get hosts status per template
-------------------------- EXAMPLE 8 --------------------------
PS C:\\>Get-ZabbixHost | ? name -match hostName | Get-ZabbixTemplate | select name
Get templates for host
RELATED LINKS
SYNOPSIS
Get templates
SYNTAX
Get-ZabbixTemplate [[-TemplateName] <Array>] [[-TemplateID] <Array>] [[-HostID] <Array>] [[-hostids] <Array>]
[[-parentTemplates] <Array>] [[-jsonrpc] <String>] [[-session] <String>] [[-id] <String>] [[-URL] <String>]
[<CommonParameters>]
DESCRIPTION
Get templates
PARAMETERS
-TemplateName <Array>
To filter by name of the template (case sensitive)
Required? false
Position? 1
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-TemplateID <Array>
To filter by id of the template
Required? false
Position? 2
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-HostID <Array>
Required? false
Position? 3
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-hostids <Array>
Required? false
Position? 4
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-parentTemplates <Array>
Required? false
Position? 5
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-jsonrpc <String>
Required? false
Position? 6
Default value ($global:zabSessionParams.jsonrpc)
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-session <String>
Required? false
Position? 7
Default value ($global:zabSessionParams.session)
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-id <String>
Required? false
Position? 8
Default value ($global:zabSessionParams.id)
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-URL <String>
Required? false
Position? 9
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-ZabbixTemplate
Get all templates
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Get-ZabbixTemplate | select name,hosts
Get templates and hosts
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Get-ZabbixTemplate -TemplateName "Template OS Windows"
Get template by name (case sensitive)
-------------------------- EXAMPLE 4 --------------------------
PS C:\\>Get-ZabbixTemplate | ? name -match OS | select templateid,name -Unique
Get template by name (case insensitive)
-------------------------- EXAMPLE 5 --------------------------
PS C:\\>Get-ZabbixTemplate | ? {$_.hosts.host -match "host"} | select templateid,name
Get templates linked to host by hostname
-------------------------- EXAMPLE 6 --------------------------
PS C:\\>Get-ZabbixTemplate | ? name -eq "Template OS Linux" | select -ExpandProperty hosts | select
host,jmx_available,*error* | ft -a
Get hosts status per template
-------------------------- EXAMPLE 7 --------------------------
PS C:\\>Get-ZabbixTemplate "Template OS Linux" | select -pv templ | select -ExpandProperty hosts | select
@{n='Template';e={$templ.name}},Name,Status,Error
Get hosts status per template
-------------------------- EXAMPLE 8 --------------------------
PS C:\\>Get-ZabbixHost | ? name -match hostName | Get-ZabbixTemplate | select name
Get templates for host
RELATED LINKS