Compartir a través de


IVMVirtualServer::Tasks property

The Tasks property contains a collection of tasks.

This property is read-only.

Syntax

HRESULT get_Tasks(
  [out] IVMTaskCollection **taskCollection
);

VB
VMVirtualServer.Tasks( _
  ByRef taskCollection _
)

Property value

The IVMTaskCollection object associated with Virtual Server.

This property value is read-only.

Error codes

Name Meaning
S_OK
The operation was successful.
E_POINTER
The taskCollection parameter is NULL.
DISP_E_EXCEPTION
An unexpected error occurred.

Examples

The following example displays properties of the Tasks object associated with the VMVirtualServer object.

Set objVS = CreateObject("VirtualServer.Application")
Wscript.Echo "Name: " & objVS.Name

Set objTColl = objVS.Tasks
If objTColl.Count = 0 Then
  Wscript.Echo "Current tasks: [none]"
Else
  Wscript.Echo "Current tasks: "
  For Each objT in objTColl
    Wscript.Echo "    Task: " & objT.ID & ":" & objT.Description
  Next
End If

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

IVMVirtualServer