Could someone help me get the ring buffer values from all the ESXi hosts for all the vmnics? I’m trying to get the hostname, vmnic name and its corresponding rx buffer values (both current and preset).
$Hosts = Get-VMhost
foreach ($ESXi in $Hosts) {
$esxcli = Get-EsxCli –VMHost $ESXi –V2
foreach ($vmnic in $EsxCli.network.nic.list.Invoke()) {
ForEach-Object –Process {
$EsxCli.network.nic.ring.current.get.Invoke(@{nicname = $vmnic.Name})
$EsxCli.network.nic.ring.preset.get.Invoke(@{nicname = $vmnic.Name})
}
}
}
Although the above code gives me the values, it still produces errors.