Configuring host networking

The Get-VMHostNetwork cmdlet will retrieve information about the network on a specific host. This cmdlet has the following syntax:

Get-VMHostNetwork [-Server <VIServer[]>] [-VMHost] <VMHost[]> [<CommonParameters>]

In the next example, we will retrieve the information about the network on the host 192.168.0.133:

PowerCLI C:\> Get-VMHost -Name 192.168.0.133 | Get-VMHostNetwork |
>> Format-List *
>>

VMHostId                : HostSystem-host-167
VMHost                  : 192.168.0.133
VMKernelGateway         : 192.168.0.1
VMKernelGatewayDevice   :
ConsoleGateway          :
ConsoleGatewayDevice    :
DnsAddress              : {192.168.0.1}
DnsFromDhcp             : True
DnsDhcpDevice           : vmk0
DomainName              : sitecomwl306
HostName                : localhost
SearchDomain            : {localdomain, sitecomwl306}
VirtualSwitch : {vSwitch0, ...

Get Learning PowerCLI now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.