Book Image

Learning PowerCLI for VMware VSphere

By : Robert van den Nieuwendijk
Book Image

Learning PowerCLI for VMware VSphere

By: Robert van den Nieuwendijk

Overview of this book

Table of Contents (17 chapters)
Learning PowerCLI
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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, vSwitch1}
PhysicalNic             : {vmnic0, vmnic1, vmnic2, vmnic3.....