Share via


ManagementGroup.ExecuteMonitoringTask<T> Method

Definition

Caution

Please use TaskRuntime.ExecuteMonitoringTask<T>()

Executes a task.

public:
generic <typename T>
 where T : Microsoft::EnterpriseManagement::Monitoring::PartialMonitoringObject System::Collections::ObjectModel::ReadOnlyCollection<Microsoft::EnterpriseManagement::Runtime::MonitoringTaskResult ^> ^ ExecuteMonitoringTask(System::Collections::Generic::ICollection<T> ^ targets, Microsoft::EnterpriseManagement::Runtime::MonitoringTask ^ task, Microsoft::EnterpriseManagement::Runtime::TaskConfiguration ^ configuration);
[System.Obsolete("Please use TaskRuntime.ExecuteMonitoringTask<T>()")]
public System.Collections.ObjectModel.ReadOnlyCollection<Microsoft.EnterpriseManagement.Runtime.MonitoringTaskResult> ExecuteMonitoringTask<T> (System.Collections.Generic.ICollection<T> targets, Microsoft.EnterpriseManagement.Runtime.MonitoringTask task, Microsoft.EnterpriseManagement.Runtime.TaskConfiguration configuration) where T : Microsoft.EnterpriseManagement.Monitoring.PartialMonitoringObject;
member this.ExecuteMonitoringTask : System.Collections.Generic.ICollection<'T (requires 'T :> Microsoft.EnterpriseManagement.Monitoring.PartialMonitoringObject)> * Microsoft.EnterpriseManagement.Runtime.MonitoringTask * Microsoft.EnterpriseManagement.Runtime.TaskConfiguration -> System.Collections.ObjectModel.ReadOnlyCollection<Microsoft.EnterpriseManagement.Runtime.MonitoringTaskResult> (requires 'T :> Microsoft.EnterpriseManagement.Monitoring.PartialMonitoringObject)
Public Function ExecuteMonitoringTask(Of T As PartialMonitoringObject) (targets As ICollection(Of T), task As MonitoringTask, configuration As TaskConfiguration) As ReadOnlyCollection(Of MonitoringTaskResult)

Type Parameters

T

Must be of type PartialMonitoringObject.

Parameters

targets
ICollection<T>

The entities to target.

task
MonitoringTask

The task to submit.

configuration
TaskConfiguration

The configuration of the task.

Returns

The task results.

Attributes

Exceptions

There was an error processing results on the server.

Examples

For an example of the ExecuteMonitoringTaskmethod, see How to Synchronously Run a Management Pack Task

Applies to