How to Create a Basic Management Pack
Applies To: System Center 2012 - Service Manager
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
The management pack comprises the definition of your solution. It contains the solution’s key components their configurations. A management group contains two types of management packs: core-system management packs and user-defined management packs. A complex management pack will primarily be written in XML and imported into the Service Manager data store. Alternatively, the following material describes how to create a management pack through code.
To create a new management pack, simply create an instance of the ManagementPack class. When you provide the EnterpriseManagementGroup connection object to the constructor, your management pack will be able to resolve all references to other management packs. References to other management packs lets you use their functionality. Service Manager also provides the functionality of management packs that were installed with Service Manager.
Note
The following procedure only defines a management pack; it does not install the management pack. To learn about how to install a management pack, see Scenario: Managing Management Packs
To create the management pack
Create a connection to the server by use of the EnterpriseManagementGroup object.
Specify the name, friendly name, and version of the management pack.
Create the ManagementPack instance.
Example
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>
Compiling the Code
Namespaces
Microsoft.EnterpriseManagement |
Microsoft.EnterpriseManagement.Configuration |
System |
Assemblies
Microsoft.EnterpriseManagement.Core |
System |
See Also
Tasks
How to Export a Management Pack
How to Reference Resources in a Management Pack