Share via


IVMAccountant::NetworkBytesReceived property

The NetworkBytesReceived property contains the total number of bytes received by all virtual network interface cards for this virtual machine.

This property is read-only.

Syntax

HRESULT get_NetworkBytesReceived(
  [out] VARIANT *bytesReceived
);

VB
VMAccountant.NetworkBytesReceived( _
  ByRef bytesReceived _
)

Property value

The total number of bytes received by all virtual network interface cards for this virtual machine. The number is returned as a Decimal value.

This property value is read-only.

Error codes

Name Meaning
S_OK
The operation was successful.
E_POINTER
bytesReceived is NULL.
S_FALSE
The virtual machine is not running.
DISP_E_EXCEPTION
An unexpected error occurred.

Remarks

Note that network I/O statistics are reset to zero when a virtual machine is powered up, reset, or restored from saved state.

Examples

The following example prints the NetworkBytesReceived property information for each virtual machine.

Set objVS = CreateObject("VirtualServer.Application")
set colVMs = objVS.VirtualMachines

For Each objVM in colVMS
    Set colAccountants = objVM.Accountant
        Wscript.Echo "Virtual machine: " & objVM.Name
        Wscript.Echo "Network bytes received: " & colAccountants.NetworkBytesReceived
        Wscript.Echo
Next

Requirements

Product
Microsoft Virtual Server 2005 onWindows Server 2003
Download
Microsoft Virtual Server 2005 R2 SP1 Update onWindows Server 2008orWindows Server 2003
Header
VsComInterfaces.h

See also

IVMAccountant