< Back
Copy-ZabbixHost
Post
NAME Copy-ZabbixHost
SYNOPSIS
Copy/clone host
SYNTAX
Copy-ZabbixHost [-HostName] <String> [[-HostID] <String>] [[-TemplateID] <Array>] [[-IP] <String>] [[-Port]
<String>] [[-interfaces] <Array>] [[-templates] <Array>] [-status] <String> [[-groups] <Array>] [[-GroupID]
<String>] [[-httpTests] <Array>] [[-ProxyHostID] <Int32>] [[-jsonrpc] <String>] [[-session] <String>] [[-id]
<String>] [[-URL] <String>] [<CommonParameters>]
DESCRIPTION
Copy/clone host
PARAMETERS
-HostName <String>
HostName of the host as it will display on zabbix
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-HostID <String>
Required? false
Position? 2
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-TemplateID <Array>
ID/IDs of the templates to add to the host
Required? false
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
-IP <String>
IP address to supervise the host
Required? false
Position? 4
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Port <String>
Port to supervise the host
Required? false
Position? 5
Default value 10050
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-interfaces <Array>
Required? false
Position? 6
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-templates <Array>
Required? false
Position? 7
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-status <String>
Required? true
Position? 8
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-groups <Array>
Required? false
Position? 9
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-GroupID <String>
ID of the group where add the host
Required? false
Position? 10
Default value
Accept pipeline input? false
Accept wildcard characters? false
-httpTests <Array>
Required? false
Position? 11
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-ProxyHostID <Int32>
Required? false
Position? 12
Default value 0
Accept pipeline input? false
Accept wildcard characters? false
-jsonrpc <String>
Required? false
Position? 13
Default value ($global:zabSessionParams.jsonrpc)
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-session <String>
Required? false
Position? 14
Default value ($global:zabSessionParams.session)
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-id <String>
Required? false
Position? 15
Default value ($global:zabSessionParams.id)
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-URL <String>
Required? false
Position? 16
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-ZabbixHost -HostName SourceHost | Copy-ZabbixHost -HostName NewHost -IP 10.20.10.10
Full copy of the host with new Hostname and IP
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Get-ZabbixHost | ? name -eq sourceHost | Copy-ZabbixHost -HostName NewHost -IP 10.20.10.10
Full clone of the host with new Hostname and IP
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Get-ZabbixHost | ? name -eq SourceHost | Copy-ZabbixHost -HostName NewHost -IP 10.20.10.10 -status 1
Full clone of the host with new Hostname and IP with status 1 (disabled)
-------------------------- EXAMPLE 4 --------------------------
PS C:\\>Import-Csv c:\\new-servers.csv | %{Get-ZabbixHost | ? name -eq SourceHost | Clone-ZabbixHost -HostName
$_.Hostname -IP $_.IP}
Mass clone new hosts
RELATED LINKS
SYNOPSIS
Copy/clone host
SYNTAX
Copy-ZabbixHost [-HostName] <String> [[-HostID] <String>] [[-TemplateID] <Array>] [[-IP] <String>] [[-Port]
<String>] [[-interfaces] <Array>] [[-templates] <Array>] [-status] <String> [[-groups] <Array>] [[-GroupID]
<String>] [[-httpTests] <Array>] [[-ProxyHostID] <Int32>] [[-jsonrpc] <String>] [[-session] <String>] [[-id]
<String>] [[-URL] <String>] [<CommonParameters>]
DESCRIPTION
Copy/clone host
PARAMETERS
-HostName <String>
HostName of the host as it will display on zabbix
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-HostID <String>
Required? false
Position? 2
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-TemplateID <Array>
ID/IDs of the templates to add to the host
Required? false
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
-IP <String>
IP address to supervise the host
Required? false
Position? 4
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Port <String>
Port to supervise the host
Required? false
Position? 5
Default value 10050
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-interfaces <Array>
Required? false
Position? 6
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-templates <Array>
Required? false
Position? 7
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-status <String>
Required? true
Position? 8
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-groups <Array>
Required? false
Position? 9
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-GroupID <String>
ID of the group where add the host
Required? false
Position? 10
Default value
Accept pipeline input? false
Accept wildcard characters? false
-httpTests <Array>
Required? false
Position? 11
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-ProxyHostID <Int32>
Required? false
Position? 12
Default value 0
Accept pipeline input? false
Accept wildcard characters? false
-jsonrpc <String>
Required? false
Position? 13
Default value ($global:zabSessionParams.jsonrpc)
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-session <String>
Required? false
Position? 14
Default value ($global:zabSessionParams.session)
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-id <String>
Required? false
Position? 15
Default value ($global:zabSessionParams.id)
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-URL <String>
Required? false
Position? 16
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-ZabbixHost -HostName SourceHost | Copy-ZabbixHost -HostName NewHost -IP 10.20.10.10
Full copy of the host with new Hostname and IP
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Get-ZabbixHost | ? name -eq sourceHost | Copy-ZabbixHost -HostName NewHost -IP 10.20.10.10
Full clone of the host with new Hostname and IP
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Get-ZabbixHost | ? name -eq SourceHost | Copy-ZabbixHost -HostName NewHost -IP 10.20.10.10 -status 1
Full clone of the host with new Hostname and IP with status 1 (disabled)
-------------------------- EXAMPLE 4 --------------------------
PS C:\\>Import-Csv c:\\new-servers.csv | %{Get-ZabbixHost | ? name -eq SourceHost | Clone-ZabbixHost -HostName
$_.Hostname -IP $_.IP}
Mass clone new hosts
RELATED LINKS