Share via


How to Create a Basic Management Pack

Applies To: System Center Service Manager 2010

The management pack defines all aspects of your solution. It contains all the key components of the solution and also their configuration. A management group contains two types of management packs, core-system management packs and user-defined management packs. While a complex management pack is mostly going to be written in XML and imported into the Service Manager data store, the following example shows how to create a management pack through code. Creating a new management pack is as simple as creating an instance of the ManagementPack class and providing the EnterpriseManagementGroup object. Inevitably, your management pack will have to reference something from the core management packs, and providing the management group on the management pack constructor enables this to occur if it is required. Referencing other management packs lets you use the functionality they provide and Service Manager provides management packs that are specific to the product and those that are generic enough that can be used by your solutions.

Note

This example only defines a management pack; it does not install the management pack.

To create the management pack

  1. Create a connection to the server by using the EnterpriseManagementGroup object.

  2. Define the name, friendly name, and version of the management pack.

  3. Create the ManagementPack instance.

The following example creates a new management pack named RePackaging.Library.

EnterpriseManagementGroup mg = new EnterpriseManagementGroup("localhost");

string mpName = "RePackaging.Library";
string mpFriendlyName = "RePackaging Library";
Version mpVersion = new Version(1, 0);

ManagementPack mp = new ManagementPack(mpName, mpFriendlyName, mpVersion, mg);
<ManagementPack ContentReadable="true" SchemaVersion="1.1" OriginalSchemaVersion="1.1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <Manifest>
    <Identity>
      <ID>RePackaging.Library</ID>
      <Version>1.0.0.0</Version>
    </Identity>
    <Name>RePackaging Library</Name>
    <References />
  </Manifest>
</ManagementPack>

Namespaces

Microsoft.EnterpriseManagement

Microsoft.EnterpriseManagement.Configuration

Assemblies

Microsoft.EnterpriseManagement.Core