How to Install a Management Pack

Applies To: System Center Service Manager 2010

After a management pack has been created by hand or loaded, it must be installed. If the management pack already exists, installing it again will update it as long as the management pack version is the same or a later version.

To load and install a management pack bundle

  1. Create the bundle from the bundle factory.

  2. Create a new bundle reader from the factory.

  3. Read the bundle file.

  4. Import the bundle through the management group.

The following example demonstrates how to load and install 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);

Namespaces

Microsoft.EnterpriseManagement

Microsoft.EnterpriseManagement.Packaging

Assemblies

Microsoft.EnterpriseManagement.Core

Microsoft.EnterpriseManagement.Packaging

To install a management pack object

  1. Call the ImportManagementPack method on the IManagementPackManagement object.

As long as you have access to a management pack object, regardless of how it was created, you can install it. The following example demonstrates how to install a management pack object.

managementGroup.ManagementPacks.ImportManagementPack(managementPack);

Namespaces

Microsoft.EnterpriseManagement.Configuration

Microsoft.EnterpriseManagement

Microsoft.EnterpriseManagement.Packaging

Assemblies

Microsoft.EnterpriseManagement.Core

Microsoft.EnterpriseManagement.Packaging