< Back
Set-ZabbixHostGroupAddHosts
Post
NAME Set-ZabbixHostGroupAddHosts
SYNOPSIS
Set host group: add hosts to multiple groups
SYNTAX
Set-ZabbixHostGroupAddHosts [[-Name] <Array>] [[-GroupID] <Array>] [[-HostID] <Array>] [[-TemplateID] <Array>]
[[-jsonrpc] <String>] [[-session] <String>] [[-id] <String>] [[-URL] <String>] [<CommonParameters>]
DESCRIPTION
Set host group: add hosts to multiple groups
PARAMETERS
-Name <Array>
Required? false
Position? 1
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-GroupID <Array>
To filter by id of the group
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
-TemplateID <Array>
Required? false
Position? 4
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-jsonrpc <String>
Required? false
Position? 5
Default value ($global:zabSessionParams.jsonrpc)
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-session <String>
Required? false
Position? 6
Default value ($global:zabSessionParams.session)
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-id <String>
Required? false
Position? 7
Default value ($global:zabSessionParams.id)
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-URL <String>
Required? false
Position? 8
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 | ? name -eq hostGroup | Set-ZabbixHostGroupAddHosts -HostID (Get-ZabbixHost | ? name
-match "host").hostid
Add hosts to the host group
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Get-ZabbixHostGroup | ? name -match hostGroups | Set-ZabbixHostGroupAddHosts -HostID (Get-ZabbixHost | ?
name -match hosts).hostid
Add hosts to multiple groups
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Get-ZabbixHostGroup -GroupID 25 | Set-ZabbixHostGroupAddHosts -TemplateID (get-zabbixtemplate | ? name
-match template1|template2).templateid
Add templates to the host group
RELATED LINKS
SYNOPSIS
Set host group: add hosts to multiple groups
SYNTAX
Set-ZabbixHostGroupAddHosts [[-Name] <Array>] [[-GroupID] <Array>] [[-HostID] <Array>] [[-TemplateID] <Array>]
[[-jsonrpc] <String>] [[-session] <String>] [[-id] <String>] [[-URL] <String>] [<CommonParameters>]
DESCRIPTION
Set host group: add hosts to multiple groups
PARAMETERS
-Name <Array>
Required? false
Position? 1
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-GroupID <Array>
To filter by id of the group
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
-TemplateID <Array>
Required? false
Position? 4
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-jsonrpc <String>
Required? false
Position? 5
Default value ($global:zabSessionParams.jsonrpc)
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-session <String>
Required? false
Position? 6
Default value ($global:zabSessionParams.session)
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-id <String>
Required? false
Position? 7
Default value ($global:zabSessionParams.id)
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-URL <String>
Required? false
Position? 8
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 | ? name -eq hostGroup | Set-ZabbixHostGroupAddHosts -HostID (Get-ZabbixHost | ? name
-match "host").hostid
Add hosts to the host group
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Get-ZabbixHostGroup | ? name -match hostGroups | Set-ZabbixHostGroupAddHosts -HostID (Get-ZabbixHost | ?
name -match hosts).hostid
Add hosts to multiple groups
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Get-ZabbixHostGroup -GroupID 25 | Set-ZabbixHostGroupAddHosts -TemplateID (get-zabbixtemplate | ? name
-match template1|template2).templateid
Add templates to the host group
RELATED LINKS