< Back

New-ZabbixTemplate

Sun Jan 19, 2020 6:12 pm

NAME New-ZabbixTemplate



SYNOPSIS

Create new template





SYNTAX

New-ZabbixTemplate [-TemplateHostName] <String> [[-TemplateDescription] <String>] [[-TemplateID] <Array>]

[[-GroupID] <Array>] [[-HostID] <Array>] [[-groups] <Array>] [[-templates] <Array>] [[-hosts] <Array>]

[[-parentTemplates] <Array>] [[-screens] <Array>] [[-applications] <Array>] [[-triggers] <Array>] [[-httpTests]

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





DESCRIPTION

Create new template





PARAMETERS

-TemplateHostName <String>

(Required) Template hostname: Technical name of the template



Required? true

Position? 1

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-TemplateDescription <String>

[Alias("name")][Parameter(Mandatory=$False,ValueFromPipelineByPropertyName=$True)][string]$TemplateVisibleName,



Required? false

Position? 2

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-TemplateID <Array>



Required? false

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false



-GroupID <Array>



Required? false

Position? 4

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-HostID <Array>



Required? false

Position? 5

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-groups <Array>

(Required) Host groups to add the template to, Default: HostGroup=1 (Templates)



Required? false

Position? 6

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-templates <Array>

Templates to be linked to the template



Required? false

Position? 7

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-hosts <Array>

Hosts to link the template to



Required? false

Position? 8

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-parentTemplates <Array>



Required? false

Position? 9

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-screens <Array>



Required? false

Position? 10

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-applications <Array>



Required? false

Position? 11

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-triggers <Array>



Required? false

Position? 12

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-httpTests <Array>



Required? false

Position? 13

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-jsonrpc <String>

[Parameter(Mandatory=$False,ValueFromPipelineByPropertyName=$True)][array]$macros,

[switch]$AddToDefaultTemplateGroup,



Required? false

Position? 14

Default value ($global:zabSessionParams.jsonrpc)

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-session <String>



Required? false

Position? 15

Default value ($global:zabSessionParams.session)

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-id <String>



Required? false

Position? 16

Default value ($global:zabSessionParams.id)

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-URL <String>



Required? false

Position? 17

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:\\>New-ZabbixTemplate -TemplateHostName "newTemplateName" -GroupID ((Get-ZabbixHostGroup | ? name -match

Templates).groupid) -HostID (Get-ZabbixHost | ? name -match hostName).hostid -templates (Get-ZabbixTemplate | ?

name -eq "TemplateName" ).templateid



Create new template









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



PS C:\\>Get-ZabbixTemplate | ? name -eq "Template OS Linux" | New-ZabbixTemplate -TemplateHostName "Template OS

Linux - Clone" -TemplateDescription "description"



Clone template (partially: groups, linked templates and hosts)









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



PS C:\\>New-ZabbixTemplate -TemplateHostName "newTemplateName"



Create new template











RELATED LINKS