How to Configure Management Group Properties
Applies To: System Center 2012 - Operations Manager
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
You can use the Operations Manager class libraries to query and change many of the default management group settings.
Example
The following example demonstrates how to display the default heartbeat interval for all agent-managed computers in the management group. The example then changes the default interval to a new value.
/// <summary>
/// Displays the current default agent heartbeat interval,
/// and then changes the interval to 50 seconds.
/// </summary>
using System;
using Microsoft.EnterpriseManagement;
using Microsoft.EnterpriseManagement.Administration;
namespace SDKSamples
{
class Program
{
static void Main(string[] args)
{
ManagementGroup mg = new ManagementGroup("localhost");
Console.WriteLine("Configuring Management Group properties...");
Console.WriteLine("The heartbeat interval is currently: "
+ mg.Administration.Settings.GetDefaultValue(Settings.Agent.Heartbeats.Interval));
mg.Administration.Settings.SetDefaultValue<int>(Settings.Agent.Heartbeats.Interval,50);
Console.WriteLine("Agent heartbeat interval has now been set to: " +
mg.Administration.Settings.GetDefaultValue(Settings.Agent.Heartbeats.Interval));
}
}
}
See Also
Tasks
How to Display Management Pack Contents