Sneak preview of sealed MPs using PowerShell

Today I needed to check if a customer had installed the latest versions of available Management Packs. And there are many tools that can help you with that, but I wanted to know if the downloaded MP files had a newer version than the ones installed in the Management Group.

I could have used  Boris Yanushpolsky’s  MPViewer to check which version the MP file had, but what better than use PowerShell to have a Sneak Preview of the Version of the downloaded MP file Winking smile

Here is the script I created. Just save it to SneakPreviewSealedMPFile.ps1 and have fun.

    Use this script to have a sneak preview of the sealed MP file.
    You need to have the OpsMgr Console installed for this script to work.
    Example usage: .\SneakPreviewSealedMPFile.ps1 "C:\Install\OpsMgr\MPs\SCOMCrossPlatformCU3MP\"


# Loads an assembly from the application directory or from the global assembly cache using a partial name
$assembly = [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.EnterpriseManagement.OperationsManager")| out-null

# Create a new .Net Object   
$mp = new-object Microsoft.EnterpriseManagement.Configuration.ManagementPack($sealedmp)

#  Format the result
$mp | format-list




Comments (0)

Skip to main content