vwmagic
Enthusiast
Enthusiast

To list IP's for every vmkernel adapters on every esxi hosts

Jump to solution

We have a number of ESXi host in a vCenter, each ESXi host has multiple vmkernel adapters. I am seeking a POWERCLI scripts (not commands on ESXi hosts) to go through all ESXi hosts, and list IP addresses for every vmkernel adapters adapters on each ESXi host. 

I have some knowledge of POWERCLI, but, not so skillful. Please find attached an example.

Can you please help me out?

Labels (2)
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership

Try like this

Get-VMHost -PipelineVariable esx |
Get-VMHostNetworkAdapter -VMKernel |
Select-Object @{N = 'VMhost'; E = { $esx.Name } }, Name, IP


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

Tags (1)
1 Reply
LucD
Leadership
Leadership

Try like this

Get-VMHost -PipelineVariable esx |
Get-VMHostNetworkAdapter -VMKernel |
Select-Object @{N = 'VMhost'; E = { $esx.Name } }, Name, IP


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Tags (1)