Partager via


How to Install a 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.]

After a management pack has been created by hand or loaded, it must be installed for use. If a previous version of the management pack is already installed, you can update it by installing the same or later version of the management pack. If the management pack refers to resources, those resources can be imported together with the management pack. For more information about importing management packs with resources, see How to Install a Management Pack with Resources

To install a management pack

  1. Use an instance of the EnterpriseManagementGroup to call the ImportManagementPack method and pass in the management pack you want to install or update.

To load and install a management pack bundle

  1. Create a new instance of the EnterpriseManagementGroup class to connect to a management server.

  2. To get an instance of the ManagementPackBundleReader class, call the CreateBundleReader method.

  3. Call the Read method. When you do this, supply the file name of the bundle and an instance of the EnterpriseManagementGroup class. This will return you an instance of the ManagementPackBundle class.

  4. Use your existing EnterpriseManagementGroup instance to call the ImportBundle method.

Example

The following example imports a management pack instance.

managementGroup.ManagementPacks.ImportManagementPack(managementPack);

The following example imports a management pack bundle.

EnterpriseManagementGroup mg = new EnterpriseManagementGroup("localhost");
ManagementPackBundle bundle;
ManagementPackBundleReader bundleReader = ManagementPackBundleFactory.CreateBundleReader();
string bundleFile = @".\RePackaging.Library.mpb";

bundle = bundleReader.Read(bundleFile, mg);
mg.ManagementPacks.ImportBundle(bundle);

Compiling the Code

Namespaces

Microsoft.EnterpriseManagement

Microsoft.EnterpriseManagement.Packaging

Microsoft.EnterpriseManagement.Configuration

Assemblies

Microsoft.EnterpriseManagement.Core

See Also

Tasks

How to Install a Management Pack with Resources
How to Uninstall a Management Pack
How to Reference Existing Management Packs

Reference

EnterpriseManagementGroup
ManagementPackBundleReader
ManagementPackBundleFactory
ManagementPackBundle

Other Resources

Scenario: Managing Management Packs