Sealing referenced Management Packs for MP Authoring


This week I again had the ‘pleasure’ of needing sealed Management Packs when trying to author Management Packs.

Take a look at the error message I got when I wanted to author a Management Pack in Silect’s MP Author tool.

image

So I tried to find all the sealed mp files I could find on my Management Server(s) and added those to the MP Author Store location.

image

But that still didn’t solved my issue. I just had not the MP file (version) I needed to start editing the Management Pack in MP Author.

What else could I do? I knew I had all the latest Management Pack files stored in the Operations Manager database. I could export the Management Packs files using PowerShell but the only problem there, was that those files are not sealed.

What do you need?

Would it be possible to seal these unsealed exported files?

For sealing Management Packs you have two available options:

  1. MPSeal tool
  2. FastSeal tool

First I tried to use the MPSeal tool but that gave too many errors when trying to seal the missing Microsoft.SystemCenter.Library.xml file.

image

Next I tried successfully the FastSeal.exe tool. Hoorah!

image

The next step was to seal all my exported Management Pack using a PowerShell Wrapper Function around the FastSeal.exe tool so I could add all the newly sealed Management Packs to the Silect MP Author Store location.

Let’s see the script in action.

First Export the Management Packs. Get-SCOMManagementPack | Export-SCOMManagementPack –path c:\temp\MPSeal\Input

exportmps

Next run the FastSeal-MP PowerShell script Function.

Fastseal-mp

And the final step is to add or copy the newly sealed MP files to the Silect MP Author Store folder.

Note

Thanks Henrik Andersen for pointing this out via Twitter.

Before you start editing your Management Pack in MP Author you need to write down the Public Token keys from the Referenced originally sealed MPs.

image

After editing the MP file using the self-signed Management Pack you need to check and if needed change the Public Key Token to the original one before you are able to import the MP again. You can do this after you saved the Management Pack in the MP Authoring tool and open the xml file with an XML editor like Notepad++.

Here you see an overview of two sealed System.Library Management Packs where one is the original MP and one the self-signed.

image

Let’s continue with loading the Management Pack for editing in MP Author.

image

And let’s try again to open the Unsealed Management which I initially was not able to open.

image

Finally success!

You can find the PowerShell script here: https://github.com/stefanstranger/PowerShell/blob/master/Examples/FastSealWrapper.ps1

And again don’t forget the change the Public Key token in your MP xml file back to the official sealed Management Pack references value(s ) before importing you edited Management Pack.

Disclaimer:
This example is provided “AS IS” with no warranty expressed or implied. Run at your own risk.
**Always test in your lab first**  Do this at your own risk!!
The author will not be held responsible for any damage you incur when making these changes!

Comments (1)

  1. Valery says:

    Thank you. That was helpful.

Skip to main content