< Back
Set-ZabbixHostInterface
Post
NAME Set-ZabbixHostInterface
SYNOPSIS
Set host interface
SYNTAX
Set-ZabbixHostInterface [[-HostID] <String>] [[-InterfaceID] <String>] [[-IP] <String>] [[-DNS] <String>] [[-Port]
<String>] [[-main] <String>] [[-type] <String>] [[-useIP] <String>] [[-jsonrpc] <String>] [[-session] <String>]
[[-id] <String>] [[-URL] <String>] [<CommonParameters>]
DESCRIPTION
Set host interface
PARAMETERS
-HostID <String>
HostID
Required? false
Position? 1
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-InterfaceID <String>
Required? false
Position? 2
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-IP <String>
Interface IP address
Required? false
Position? 3
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-DNS <String>
Interface DNS name
Required? false
Position? 4
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Port <String>
Interface Port
Required? false
Position? 5
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-main <String>
Interface Main: Possible values are: 0 - not default; 1 - default
Required? false
Position? 6
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-type <String>
Interface Type: Possible values are: 1 - agent; 2 - SNMP; 3 - IPMI; 4 - JMX
Required? false
Position? 7
Default value 4
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-useIP <String>
Interface UseIP: Possible values are: 0 - connect using host DNS name; 1 - connect using host IP address for
this host interface
Required? false
Position? 8
Default value 1
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-jsonrpc <String>
Required? false
Position? 9
Default value ($global:zabSessionParams.jsonrpc)
Accept pipeline input? false
Accept wildcard characters? false
-session <String>
Required? false
Position? 10
Default value ($global:zabSessionParams.session)
Accept pipeline input? false
Accept wildcard characters? false
-id <String>
Required? false
Position? 11
Default value ($global:zabSessionParams.id)
Accept pipeline input? false
Accept wildcard characters? false
-URL <String>
Required? false
Position? 12
Default value ($global:zabSessionParams.url)
Accept pipeline input? false
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 | ? name -match host | Get-ZabbixHostInterface | %{Set-ZabbixHostInterface -IP 10.20.10.10
-InterfaceID $_.interfaceid -HostID $_.hostid -Port $_.port}
Set new IP to multiple host interfaces
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Get-ZabbixHost | ? name -match host | Get-ZabbixHostInterface | ? port -notmatch "10050|31001" | ? main
-match 1 | Set-ZabbixHostInterface -main 0
Set interfaces on multiple hosts to be not default
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Get-ZabbixHost | ? name -match host | Get-ZabbixHostInterface | ? port -match 31021 |
Set-ZabbixHostInterface -main 0
Set interface matches port 31021 on multiple hosts to default
-------------------------- EXAMPLE 4 --------------------------
PS C:\\>Get-ZabbixHost -HostName MyHost | Get-ZabbixHostInterface | Set-ZabbixHostInterface -dns MyHost.example.com
-useIP 0
Set interface DNS name and order to connect to host by DNS name and not by IP address
-------------------------- EXAMPLE 5 --------------------------
PS C:\\>Get-ZabbixHost | ? name -match host | Get-ZabbixHostInterface | ? type -eq 4 | Remove-ZabbixHostInterface
Remove all JMX (type 4) interfaces from host
RELATED LINKS
SYNOPSIS
Set host interface
SYNTAX
Set-ZabbixHostInterface [[-HostID] <String>] [[-InterfaceID] <String>] [[-IP] <String>] [[-DNS] <String>] [[-Port]
<String>] [[-main] <String>] [[-type] <String>] [[-useIP] <String>] [[-jsonrpc] <String>] [[-session] <String>]
[[-id] <String>] [[-URL] <String>] [<CommonParameters>]
DESCRIPTION
Set host interface
PARAMETERS
-HostID <String>
HostID
Required? false
Position? 1
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-InterfaceID <String>
Required? false
Position? 2
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-IP <String>
Interface IP address
Required? false
Position? 3
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-DNS <String>
Interface DNS name
Required? false
Position? 4
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Port <String>
Interface Port
Required? false
Position? 5
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-main <String>
Interface Main: Possible values are: 0 - not default; 1 - default
Required? false
Position? 6
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-type <String>
Interface Type: Possible values are: 1 - agent; 2 - SNMP; 3 - IPMI; 4 - JMX
Required? false
Position? 7
Default value 4
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-useIP <String>
Interface UseIP: Possible values are: 0 - connect using host DNS name; 1 - connect using host IP address for
this host interface
Required? false
Position? 8
Default value 1
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-jsonrpc <String>
Required? false
Position? 9
Default value ($global:zabSessionParams.jsonrpc)
Accept pipeline input? false
Accept wildcard characters? false
-session <String>
Required? false
Position? 10
Default value ($global:zabSessionParams.session)
Accept pipeline input? false
Accept wildcard characters? false
-id <String>
Required? false
Position? 11
Default value ($global:zabSessionParams.id)
Accept pipeline input? false
Accept wildcard characters? false
-URL <String>
Required? false
Position? 12
Default value ($global:zabSessionParams.url)
Accept pipeline input? false
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 | ? name -match host | Get-ZabbixHostInterface | %{Set-ZabbixHostInterface -IP 10.20.10.10
-InterfaceID $_.interfaceid -HostID $_.hostid -Port $_.port}
Set new IP to multiple host interfaces
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Get-ZabbixHost | ? name -match host | Get-ZabbixHostInterface | ? port -notmatch "10050|31001" | ? main
-match 1 | Set-ZabbixHostInterface -main 0
Set interfaces on multiple hosts to be not default
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Get-ZabbixHost | ? name -match host | Get-ZabbixHostInterface | ? port -match 31021 |
Set-ZabbixHostInterface -main 0
Set interface matches port 31021 on multiple hosts to default
-------------------------- EXAMPLE 4 --------------------------
PS C:\\>Get-ZabbixHost -HostName MyHost | Get-ZabbixHostInterface | Set-ZabbixHostInterface -dns MyHost.example.com
-useIP 0
Set interface DNS name and order to connect to host by DNS name and not by IP address
-------------------------- EXAMPLE 5 --------------------------
PS C:\\>Get-ZabbixHost | ? name -match host | Get-ZabbixHostInterface | ? type -eq 4 | Remove-ZabbixHostInterface
Remove all JMX (type 4) interfaces from host
RELATED LINKS