Obviously, /a great way to learn how to author a management pack is to look at existing ones. The problem is that most of the interesting ones are sealed so you can’t read the file, and the Operations Console won’t allow you to export a sealed management pack.
This is actually very easy using Command Shell. You can export a single management pack or export the entire set of installed management packs from a management group. This is my personal favorite as I like to have the entire set of management packs available for my reference.
Command Shell is an optional component of the Operations Manager User Interfaces, so it’s probably something you already have installed.
Exporting a single management pack
To export a single management pack, use the following command:
get-managementPack -name <Name of MP> | export-managementPack -path <Directory to store exported file>
For example, to export the SQL Library MP to a directory called c:\mp:
get-managementPack -name Microsoft.SQLServer.Library | export-managementPack -path c:\mp
Exporting all management packs
It’s actually easier to export all management packs since you don’t have to specify the -name parameter on the get-managementPack CmdLet. Just use the following, and you will fill c:\mp with the entire set of management packs installed in your management group.
get-managementPack | export-managementPack -path c:\mp
Update on 2/17/2008
I would be completely remiss if I didn’t update this post to refer to Boris’ PowerShell script that can convert an MP file to XML from a command line. Certainly easier if you need to convert a sealed management pack that you don’t already have imported into a management group.