VMware Cloud Community
denjoh44
Enthusiast
Enthusiast

Get-VMHostNetworkAdapter and cluster

hello

i know for to have the vmk, ip, and vmhost

this commad is ok

Get-VMHostNetworkAdapter | select VMhost, Name, IP, SubnetMask, Mac, PortGroupName, vMotionEnabled, mtu, FullDuplex, BitRatePerSec | Export-Csv C:\VMHostNetworkDetails.csv

but, i would have the name of the cluster

can you help me

thank you

Reply
0 Kudos
2 Replies
LucD
Leadership
Leadership

You can use a calculated property

Get-VMHostNetworkAdapter | 
Select VMhost, 
@{N="Cluster";E={Get-CLuster -VMHost $_.VMHost | Select -ExpandProperty Name}}, 
Name
, IP, SubnetMask, Mac, PortGroupName, vMotionEnabled, mtu, FullDuplex, BitRatePerSec |
Export-Csv
C:\VMHostNetworkDetails.csv


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

denjoh44
Enthusiast
Enthusiast

Hi

thank you for your help

it's exactely what i have expected.

thanks

Reply
0 Kudos