ganapa2000
Enthusiast
Enthusiast

How do get Hardware Label and Status of VMnic

Hi,

How do get Hardware Label and Status of VMnic for the the below

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

I would like to get added to the above script, marked in red

Please help

ganapa2000_0-1631627091932.png

 

0 Kudos
6 Replies
LucD
Leadership
Leadership

You should be able to get that info with

$esxcli.network.nic.list.Invoke()


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

0 Kudos
ganapa2000
Enthusiast
Enthusiast

LucD,

I am unable to get Hardware Label Info

Get-VMHost -Server "myhost" |
ForEach-Object -Process {
$esxcli = Get-EsxCli -VMHost $esx -V2
$esxcli.network.nic.list.Invoke() | Select *
}

ganapa2000_0-1631628971387.png

 

0 Kudos
LucD
Leadership
Leadership

Is that screenshot earlier, coming from an ESXi console?


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

0 Kudos
ganapa2000
Enthusiast
Enthusiast

Yes, screenshot is from esxi console

0 Kudos
ganapa2000
Enthusiast
Enthusiast

Any way to get these details from cli ?

0 Kudos
LucD
Leadership
Leadership

Yes, but only when you actually assigned a Hardware Label to the PCI devices.
I don't know how ESXi creates the name (for example Ethernet0) when no Hardware Label is present.


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

0 Kudos