In my previous blog I wrote a step by step guide on how to seal a management pack. Say you have a custom created management pack, containing groups and such, which is sealed. Now you need to add another server to this group, which isn’t possible because it is sealed. To unseal you need to run a pretty simple command and a Powershell script, and here’s how:

1. On your management server, create a folder named MpToXml on the C-drive.

2. Copy the sealed management pack you want to unseal into this folder.

3. Create a .ps1 (Powershell) script containing the following (or download it from here):

param($mpFilePath,$outputDirectory)

$assembly = [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.EnterpriseManagement.OperationsManager")

$mp = new-object Microsoft.EnterpriseManagement.Configuration.ManagementPack($mpFilePath)

$mpWriter = new-object Microsoft.EnterpriseManagement.Configuration.IO.ManagementPackXmlWriter($outputDirectory)

$mpWriter.WriteManagementPack($mp)

4. Open Operations Manager Shell

5. Use the following syntax for unsealing the management pack:

C:\MpToXml\MpToXml.ps1 -mpfilepath:’C:\MpToXml\managementPack.mp’ -outputdirectory:’C:\MpToXml’

In my case that is:

C:\MpToXml\MpToXml.ps1 -mpfilepath:’C:\MpToXml\Microsoft.Windows.Library.mp’ -outputdirectory:’C:\MpToXml’ (as shown below)

image

If all goes well, you should see this line: C:\MpToXml\Microsoft.Windows.Library.xml (as shown below)…

image

… and you should have the .xml file in your MpToXml folder:

image

The management pack is now unsealed and you can import it into Operations Manager, make the changes and then seal it again (using this guide). Simple as that!