Skip to content

SCOM – How To Replace your sealed Management Pack when the original key is missing

January 24, 2013

As stated in an earlier blog:

When diving a little bit deeper in Operations Manager there comes a time when one wants to seal a management pack.”

This post has some information on sealing management packs and gives you a bit of insight on how to do this.

The Basics
When one wants to upgrade a sealed management pack the same key has to be used. If not the upgrade will fail. To give an example on what happends i abused my SCOM 2012 SP1 lab environment.

First i create a management pack and call it “Upgradable Management Pack”:

SealedMPKeyReg1

Now i seal the management pack using the information provided in a blog bij Jonathan Almquist ( i find this the best one around for this subject):

http://blogs.technet.com/b/jonathanalmquist/archive/2008/08/19/seal-a-management-pack.aspx

Now that i have sealed the management pack i remove the unsealed mp first and then import it:

SealedMPKeyReg2

At this point the management pack cannot be edited anymore.

Some weeks later i need to add a group to my “Upgradable Management pack”. Normaly i would load the unsealed MP in my test environment, add the group export it and change the version number.  Then Seal it, and import it in production. In this example did it all in my lab environment:

SealedMPKeyReg3

Simply click install and the upgrade will take place.

The Problem:

Now a problem might arrise when one wants to update a sealed management pack but you don’t have the original key. You might think: so what? I will remove the management pack and import it again right?!
You are actually right about that, but what if you have many dependencies on your sealed mp’s with many overrides configured in them? (my screenshot shows only one 😉 )You cannot remove your “Upgradable Management Pack” untill you remove all the dependencies.

SealedMPKeyReg4

Deleting the depenend management pack and import them again later is probably the quickest option. But one more problem resides.
That is that the dependency created is based on the key that your sealed mp holds. You will find this “PublicKey” in the reference to your MP in the XML file:

SealedMPKeyReg5

When the “Upgradable Management Pack” is imported and you do not change this “PublicKey” you cannot import these management packs. You will recieve a nice error like: “The dependencies for this management pack cannot be located”

SealedMPKeyReg7

The Solution

The solution isn’t actually that hard. First you need to find the new “PublicKey” on your sealed management pack. This can be done in two ways:

  1. Import the “Upgradable Management Pack” and have an override targeted to it. Export the MP where the override is saved, open the XML and find your new key.
  2. The second option is a much quicker one. Use the sn.exe tool which is probably already somewhere near your MPS folder. Run the next command against the newly sealed management pack:sn -T <managementpackname>.mp

    SealedMPKeyReg6

Yeaaahhh!!

Now so simply replace the key in the XML’s for the override mp’s and you are back in business.

Good Luck with the Copy Paste actions!

Advertisements

From → System Center

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: