OK thanks. It appears not to work though.
$vnic1s = get-vm vm100 | get-networkadapter | where {$_.name -eq 'Network adapter 1'}
get-stat -entity $vnic1s -stat net.received.average -realtime
get-stat : 5/23/2015 12:55:06 AM Get-Stat Invalid entity type. Performance statistics are collected only for Clusters, Hosts, Virtual Machines, Resource Pools, Datastores,
Datastore Clusters, Datacenters, VApps and VIServers.
At char:1
+ get-stat -entity $vnic1s -stat net.received.average -realtime
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Get-Stat], InvalidArgument
+ FullyQualifiedErrorId : Core_GetStat_TryValidateParameterList_InvalidType,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetViStats
Are you sure why I'm trying to do is possible (compare net.received.average between network adapter 1 and network adapter 2 on the same vm)? It seems like this error is saying that virtual machines are valid entities but virtual nics on those VMs are not.
thoughts?
Thanks!