Shortcut Menu

Skip

Main Navigation

Choose your language

You are here:

ActiveXperts.com > Administration > Scripts > Adsi > List All Virtual Networks

ActiveXperts Network Monitor

Quicklinks


NOTE: ActiveXperts Network Monitor supports SNMP based checks. It ships with free SNMP GET and SNMP TRAP utilities. It also offers many SNMP scripts (PowerShell and VBScript). Download Now »


List All Virtual Networks - VBScript sample

You can use any of the VBScript programs below in ActiveXperts Network Monitor. Click here for an explanation about how to include scripts in ActiveXperts Network Monitor.


Description

Lists all the virtual networks on a computer.

Example(s)

On Error Resume Next

Set objVS = CreateObject("VirtualServer.Application")
Set colNetworks = objVS.VirtualNetworks

For Each objNetwork in colNetworks
    Wscript.Echo "Bytes dropped: " & objNetwork.BytesDropped
    Wscript.Echo "Bytes received: " & objNetwork.BytesReceived
    Wscript.Echo "Bytes sent: " & objNetwork.BytesSent
    Wscript.Echo "File: " & objNetwork.File
    Wscript.Echo "Host adapter: " & objNetwork.HostAdapter
    Wscript.Echo "Name: " & objNetwork.Name
    Wscript.Echo "Notes: " & objNetwork.Notes
    Wscript.Echo "Packets dropped: " & objNetwork.PacketsDropped
    Wscript.Echo "Packets received: " & objNetwork.PacketsReceived
    Wscript.Echo "Packets sent: " & objNetwork.PacketsSent
    Wscript.Echo
Next