ManagementGroup Class

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Represents a connection to the management group.

Namespace: Microsoft.EnterpriseManagement
Assembly: Microsoft.EnterpriseManagement.OperationsManager (in Microsoft.EnterpriseManagement.OperationsManager.dll)

Usage

'Usage
Dim instance As ManagementGroup

Syntax

'Declaration
Public Class ManagementGroup
    Inherits EnterpriseManagementGroup
public class ManagementGroup : EnterpriseManagementGroup
public ref class ManagementGroup : public EnterpriseManagementGroup
public class ManagementGroup extends EnterpriseManagementGroup
public class ManagementGroup extends EnterpriseManagementGroup

Example

The following example defines a ManagementGroup instance and retrieves information about the Operation Manager components and data that are contained in the management group.

using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.EnterpriseManagement.Configuration;
using Microsoft.EnterpriseManagement.Configuration.IO;
using Microsoft.EnterpriseManagement;
using System.Collections.ObjectModel;
using Microsoft.EnterpriseManagement.Administration;
using Microsoft.EnterpriseManagement.Monitoring;

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

            IList<string>              connectedUserNames;
            ManagementGroupAdministrationSummary    summary;

            Console.WriteLine("Management Group Name: {0}", mg.Name);

            Console.WriteLine("Management Group Version: {0}", mg.Version.ToString());

            Console.WriteLine("# of Imported Management Packs: {0}", mg.ManagementPacks.GetManagementPacks().Count);

Console.WriteLine("# of Alerts: {0}", mg.OperationalData.GetMonitoringAlertsCount(new MonitoringAlertCriteria("ResolutionState='1'")));
            
            connectedUserNames = mg.GetConnectedUserNames();

            Console.WriteLine("Connected Users");

            foreach (string userName in connectedUserNames)
            {
                Console.WriteLine("\t{0}", userName);
            }            

            summary = mg.Administration.GetSummary();

            Console.WriteLine("# of Agent Managed Computers: {0}", summary.AgentManagedComputerCount);
            Console.WriteLine("# of Pending Actions: {0}", summary.AgentPendingActionCount);
            Console.WriteLine("# of Management Servers: {0}", summary.ManagementServerCount);
            Console.WriteLine("# of Remotely Managed Computers: {0}", summary.RemotelyManagedComputerCount);
            Console.WriteLine("# of Remotely Managed Devices: {0}", summary.RemotelyManagedDeviceCount);

        }
    }
}

Remarks

Use an instance of the ManagementGroup class to access and retrieve all other Operations Manager SDK objects. A management group is a System Center Operations Manager 2007 installation that includes one database, one or more management servers, and multiple agents that are installed on the physical computers. A management group can also include multiple computers that are managed by using an agentless monitoring technique.

Inheritance Hierarchy

System.Object
   Microsoft.EnterpriseManagement.Container
     Microsoft.EnterpriseManagement.ManagementPackStore
       Microsoft.EnterpriseManagement.EnterpriseManagementGroup
        Microsoft.EnterpriseManagement.ManagementGroup

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 Vista, Windows Server 2003, and

Target Platforms

Change History

See Also

Reference

ManagementGroup Members
Microsoft.EnterpriseManagement Namespace
ManagementServer
ManagementPack

Other Resources

Operations Manager SDK Architecture Overview