Keep Your Management Pack Files Organized

If you are anything like me, you have a significant collection of MP files that you’ve downloaded, extracted from the common .MSI, or exported out of SCOM. I browse unsealed (previously sealed) MP files every day to research, investigate, diagnose, troubleshoot, etc. so I find it useful to be able to determine MP/file version easily. Here are some ways to keep your unsealed MP files organized.

Export MPs from SCOM to a Folder

$outDir = 'C:\Temp\ALLMPs_Exported'
Get-SCOMManagementPack | ForEach {
    $thisMPFolder = (Join-Path $outDir ("$($_.Name)_($($_.Version.ToString()))"))
    New-Item -Path $thisMPFolder -ItemType Directory -ErrorAction Ignore
    $_ | Export-SCOMManagementPack -Path $thisMPFolder -Verbose

The folder name indicates the MP version. Most of these exported/unsealed MP files are not appropriate for import into a SCOM environment because they were previously sealed and therefore should only be used in your SCOM environment as sealed*.
(Rarely is is appropriate to unseal a sealed MP and use it unsealed in your mgmt group.)

Unseal MP/MPB Files

It’s likely that you have a repository of sealed Microsoft MPs in the standard extraction/install folder like I do. The default path is:
C:\Program Files (x86)\System Center Management Packs

To extract these sealed files to “version-coded” folders do the following:

Unseal-SCOMMP -inDir 'C:\Program Files (x86)\System Center Management Packs\Internet Information Services MP' -outDir 'D:\Temp\MPs Unsealed'

Or unseal your entire local MP store. (This function is recursive. )

Unseal-SCOMMP -inDir 'C:\Program Files (x86)\System Center Management Packs' -outDir 'C:\Temp\ALLUNSEALED'

View Sealed MP Versions

Sometimes I need to research a specific MP version for troubleshooting. Here is an easy way to locate a specific MP version. The SCOMHelper PowerShell module for SCOM includes a function to reveal MP versions.
*This function requires an active mgmt group connection

Get-SCOMMPFileInfo -inDir 'C:\Program Files (x86)\System Center Management Packs' | Out-GridView -PassThru

Ok, many of these paths in the example above already have MP versions in the name.

However, consider these examples; Sometimes when I’m writing a management pack, I need to locate a specific version for compatibility in the intended SCOM environment. Or maybe I’m researching/troubleshooting a specific, older MP for my customer. I have a folder that is stuffed full of many older MPs that I collected over many years.

I have no idea what the versions are. Problem solved:

Leave a Reply

Your email address will not be published. Required fields are marked *