A recovery object is triggered by a monitor state change or by a diagnostic object execution. The recovery workflow performs an action that can change the state of a monitored component.

You can query for recovery objects by defining criteria in the Microsoft.EnterpriseManagement.Configuration.MonitoringRecoveryCriteria class constructor. The criteria syntax is defined in Criteria Expression Syntax. The following property names are valid names that can be used in the criteria expression:

The following code queries for all recovery objects that contain SystemCenter in their name.

C#  Copy Code
/// <summary> 
/// Query for recoveries.
/// </summary>
using System;
using System.Collections.ObjectModel;
using Microsoft.EnterpriseManagement;
using Microsoft.EnterpriseManagement.Configuration;
using Microsoft.EnterpriseManagement.Monitoring;

namespace SDKSamples
	class Program
		static void Main(string[] args)
			ManagementGroup mg = new ManagementGroup("localhost");

			// The criteria specifies that you want to collect
			// all the recoveries that contain SystemCenter in their name.
			MonitoringRecoveryCriteria recoveryCriteria =
				new MonitoringRecoveryCriteria(
				"Name LIKE '%SystemCenter%'");

			Console.WriteLine("Querying for data...");
			ReadOnlyCollection<MonitoringRecovery> recoveries =

			// Display information about each recovery.
			foreach (MonitoringRecovery recovery in recoveries)
				Console.WriteLine("Recovery name: " + recovery.Name);
				Console.WriteLine("Status: " + recovery.Status.ToString());
				Console.WriteLine("Category: " + recovery.Category);
				Console.WriteLine("Description: " + recovery.Description +

Send comments about this topic to Microsoft.