Automation

 View Only
  • 1.  acquire vmnic information using get-esxcli or other cmdlets?

    Posted Jul 01, 2024 11:03 PM

    I'm trying to retrieve the ESXi 7 server's NIC information, especially the firmware and driver info usinng powercli.

    The basic codes that I utilized are listed below:

    $esxcli = Get-EsxCli -VMHost $esxiHost -V2
    $nicInfo = $esxcli.network.nic.get.Invoke(@{nicname="vmnic2"})

    However, the output will be something looks like below:

    AdvertisedAutoNegotiation : true
    AdvertisedLinkModes       : {Auto, 10000BaseSR/Full}
    AutoNegotiation           : true
    CableType                 : FIBRE
    CurrentMessageLevel       : 1
    DriverInfo                : VMware.VimAutomation.ViCore.Impl.V1.EsxCli.EsxCliObjectImpl
    LinkDetected              : true
    LinkStatus                : Up
    Name                      : vmnic2
    PHYAddress                : 0
    PauseAutonegotiate        : false
    PauseRX                   : false
    PauseTX                   : false
    SupportedPorts            : {FIBRE}
    SupportsAutoNegotiation   : true
    SupportsPause             : true
    SupportsWakeon            : true
    Transceiver               :
    VirtualAddress            : 00:50:56:59:69:01
    Wakeon                    : {MagicPacket(tm)}

    This is not what I want, which lack of driver/firmware info.

    Anyone has better way to achieve that? I don't see other words that are useful in invoke() or something yet.

    Please help



  • 2.  RE: acquire vmnic information using get-esxcli or other cmdlets?
    Best Answer

    Posted Jul 02, 2024 04:16 AM

    Have you expanded the DriverInfo property?

    $esxcli = Get-EsxCli -VMHost $esxiHost -V2
    $nicInfo = $esxcli.network.nic.get.Invoke(@{nicname="vmnic2"})
    $nicInfo.DriverInfo
    


    ------------------------------


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


    ------------------------------



  • 3.  RE: acquire vmnic information using get-esxcli or other cmdlets?

    Posted Jul 03, 2024 05:25 AM

    I forgot to take the driverinfo with it.

    This is amazing! it worked!

    by the way, combining format-list will make the output better.

    $nicInfo.DriverInfo | format-list

    THANKS SO MUCH