ManagementGroup.ExecuteMonitoringTask Generic Method

Executes a monitoring task.

Namespace: Microsoft.EnterpriseManagement
Assembly: Microsoft.EnterpriseManagement.OperationsManager (in microsoft.enterprisemanagement.operationsmanager.dll)

Usage

'Usage
Dim instance As ManagementGroup
Dim targets As ICollection(Of T)
Dim task As MonitoringTask
Dim configuration As MonitoringTaskConfiguration
Dim returnValue As ReadOnlyCollection(Of MonitoringTaskResult)

returnValue = instance.ExecuteMonitoringTask(targets, task, configuration)

Syntax

'Declaration
Public Function ExecuteMonitoringTask(Of T As PartialMonitoringObject) ( _
    targets As ICollection(Of T), _
    task As MonitoringTask, _
    configuration As MonitoringTaskConfiguration _
) As ReadOnlyCollection(Of MonitoringTaskResult)
public ReadOnlyCollection<MonitoringTaskResult> ExecuteMonitoringTask<T> (
    ICollection<T> targets,
    MonitoringTask task,
    MonitoringTaskConfiguration configuration
) where T : PartialMonitoringObject
public:
generic<typename T> where T : PartialMonitoringObject
ReadOnlyCollection<MonitoringTaskResult^>^ ExecuteMonitoringTask (
    ICollection<T>^ targets, 
    MonitoringTask^ task, 
    MonitoringTaskConfiguration^ configuration
)

GenericParameters

Parameters

  • targets
    The objects that the task targets.
  • task
    The task to submit.
  • configuration
    The configuration settings for the task.

Return Value

A read-only collection of MonitoringTaskResult objects that are the results of the task.

Example

For an example of the ExecuteMonitoringTask method, see How to Synchronously Run a Management Pack Task.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP

Target Platforms

Windows Server 2008,Windows Server 2003,Windows Vista,Windows XP

See Also

Reference

ManagementGroup Class
ManagementGroup Members
Microsoft.EnterpriseManagement Namespace

Send comments about this topic to Microsoft.