< Back

Get-ZabbixHostInterface

Sun Jan 19, 2020 6:10 pm

NAME Get-ZabbixHostInterface



SYNOPSIS

Get host interface





SYNTAX

Get-ZabbixHostInterface [[-HostID] <Array>] [[-jsonrpc] <String>] [[-session] <String>] [[-id] <String>] [[-URL]

<String>] [<CommonParameters>]





DESCRIPTION

Get host interface





PARAMETERS

-HostID <Array>



Required? false

Position? 1

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-jsonrpc <String>



Required? false

Position? 2

Default value ($global:zabSessionParams.jsonrpc)

Accept pipeline input? false

Accept wildcard characters? false



-session <String>



Required? false

Position? 3

Default value ($global:zabSessionParams.session)

Accept pipeline input? false

Accept wildcard characters? false



-id <String>



Required? false

Position? 4

Default value ($global:zabSessionParams.id)

Accept pipeline input? false

Accept wildcard characters? false



-URL <String>



Required? false

Position? 5

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-ZabbixHostInterface -HostID (Get-ZabbixHost -HostName ThisHost).hostid |ft -a



Get interface(s) for single host (case sensitive)









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



PS C:\\>Get-ZabbixHostInterface -HostID (Get-ZabbixHost | ? name -match hostName).hostid



Get interface(s) for multiple hosts (case insensitive)









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



PS C:\\>Get-ZabbixHost -HostName HostName | Get-ZabbixHostInterface | ft -a



Get interfaces for host









-------------------------- EXAMPLE 4 --------------------------



PS C:\\>hGet-ZabbixHost | ? name -match HostName | Get-ZabbixHostInterface | ft -a



Get interfaces for multiple hosts









-------------------------- EXAMPLE 5 --------------------------



PS C:\\>Get-ZabbixHost | ? name -match HostName | Get-ZabbixHostInterface | ? port -match 10050 | ft -a



Get interface matching port for multiple hosts









-------------------------- EXAMPLE 6 --------------------------



PS C:\\>Get-ZabbixHost -HostName HostName | Get-ZabbixHostInterface



Get interface(s) for single host (case sensitive)









-------------------------- EXAMPLE 7 --------------------------



PS C:\\>Get-ZabbixHost | ? name -match hostsName | %{$n=$_.name; Get-ZabbixHostInterface -HostID $_.hostid} |

select @{n="name";e={$n}},hostid,interfaceid,ip,port | sort name | ft -a



Get interface(s) for the host(s)











RELATED LINKS