Operations Manager Command Shell Main Menu
Welcome to TechNet Blogs Sign in | Join | Help
Seal a Management Pack

Sealing a Management Pack is easy.  Although, it can be frustrating the first time through.  It's a process that requires a few different pieces to interact, so preparation is key.  Going through some simple steps now will save time in the future.

  • Create a directory somewhere on a workstation where you'll be sealing MP's.  For this example, I created the directory c:\MPS
  • I also created four directories within c:\MPS
    • \Input - this directory will contain the MP to be sealed (the xml file)
    • \Output - this directory will contain the sealed MP (the final mp file)
    • \MP - this directory will contain all referenced MP’s
    • \Key - this directory will contain the pair key file
  • Copy MPSeal.exe from the source installation files "SupportTools" directory to the c:\MPS directory.
  • Copy sn.exe to the c:\MPS directory
  • Copy your unsealed MP (xml file) into the \Input directory
  • Copy all the *.mp files from the RMS installation directory into the \MP directory
    • Usually "%Program Files%\System Center Operations Manager 2007\"
  • Also, copy all *.mp files that you'll be referencing to the \MP directory
    • TIP: I'd just keep this directory updated with all available current MP's (ie; Active Directory, Exchange, etc)

Finally, the c:\MPS directory will look like this.

image

The two files highlighted:
Command.txt is just a file I created that contains the commands needed to seal the management pack.  The MPResources.resources file is automatically created while sealing management packs.  This is not anything you’ll need to copy into the directory.

Now, we're ready to seal our Management Pack.

Open a command prompt and navigate to your work directory (c:\MPS).  Run these commands in sequence.  (beware of word wrap with these commands)

  • sn -k c:\mps\key\PairKey.snk
  • sn -p c:\mps\key\PairKey.snk c:\mps\key\PubKey
  • sn -tp c:\mps\key\PubKey
  • mpseal c:\mps\input\unsealed_mp.xml /I "c:\mps\mp" /Keyfile "c:\mps\key\PairKey.snk" /Company "Your Company" /Outdir "c:\mps\output"

You should now have your sealed MP in the Output directory.  And, you'll have a working directory for later use.  Just remember to keep the MP versions in the c:\MPS\MP directory current with your Management Groups.  Otherwise, you'll get version errors while attempting to run the MPSeal tool.

Hint: Once you've created the key the first time around, it's not necessary to create a new key each time you seal a MP.  The current key may be reused.  So, the only step you'll need to actually do after the first run is the last step.  How's that for easy!

A note to developers: I’ve had some questions about where the MPResources.resources file mentioned above is created.  Specifically, if two build flavor threads (x64 and x86, for example), compiles at same time and try to create this file under sources, one build thread will break.

To solve that problem, execute MPSeal from a different location.  Examples below.

This will create the MPResources.resources file in the users %temp% directory.clip_image002

This will create the MPResources.resources file in the x86 directory I created.clip_image004

This will create the MPResources.resources file in the x64 directory I created.clip_image006

Posted: Tuesday, August 19, 2008 5:54 PM by jtalmquist

Comments

Cleber Marques said:

Hi Jonathan,

Great tutorial, congratulations.

Let me know, why can I copy Management Packs from SCOM instalation folder to other folder when I can referencing the original folder directly in command line? Example:

mpseal c:\mps\input\<unsealed_mp>.xml /I "c:\mps\mp" /Keyfi

e "c:\mps\key\PairKey.snk" /Company "Your Company" /Outdir "c:\mps\output"

instead

mpseal c:\mps\input\<unsealed_mp>.xml /I "c:\Program Files\System Center Operations Manager 2007\" /Keyfi

e "c:\mps\key\PairKey.snk" /Company "Your Company" /Outdir "c:\mps\output"

This is my doubt.

Tnx a lot.

Cleber

Response: The reason why I suggest creating these working directories, is because (1) not everyone will be sealing MP's directly on the RMS and (2) you may not have all required MP references to seal a custom MP in the programs directory on the RMS.  If you are sealing an MP that contains, for example, an Active Directory reference, you'll need to reference that MP while sealing your custom MP.  This will not be in RMS OpsMgr Program Files.  You'll need to locate them.  Creating these working directories on a workstation in which you'll be sealing MP's is simply an organizational practice.

# September 22, 2008 10:19 AM

Rod Trent at myITforum.com said:

Feed: www.contoso.se Posted on: Tuesday, February 03, 2009 8:54 AM Author: Anders Bengtsson Subject:

# February 3, 2009 4:42 PM

PWStrain said:

Let me just begin by saying : AAAaaaaaarrgh! Now I feel better. If you’ve made any attempt at implementing

# April 12, 2009 1:52 PM

Gopalan said:

Great article. I just followed point by point and i am successful. Great work... thanks a lot.

Gopalan (From India)

# May 13, 2009 7:01 AM

Kevin Holman's OpsMgr Blog said:

I have had a few requests now for this, so I thought I would take the time to write up the process. &#160;

# June 10, 2009 12:09 AM

Vamsi said:

Can we redirect the temporary files to some directory? I mean, can I give temporary path where MPResources.resources should be created?

# August 5, 2009 7:12 PM

jtalmquist said:

Hi Vamsi,

This is generated when running MPSeal, but I don’t know of a way to command the MPSeal program to create the MPResources.resources file in some other directory.

-Jonathan

# August 5, 2009 10:33 PM

jtalmquist said:

Hi Vamsi,

I figured out how and and where that MPResources.resources file is created.  I added some notes at the bottom of the post to answer your question.  It's in "A note to developers".

-Jonathan

# August 6, 2009 12:52 PM

dennis said:

Good Stuff... Thanks for the information. It's made my life with SCOM a lot better!

# September 15, 2009 7:51 AM
Leave a Comment

(required) 

(required) 

(optional)

(required) 

  
Enter Code Here: Required

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Page view tracker