Creating a central store for SCOM Management Packs


Back in 2014 I wrote a series of blog posts on how I manage my SCOM Management Packs and why. You can find the old posts here:

As I recently completely revised the underlying scripts and as I still find this topic extremely important I thought I dredge up this topic and write a new post which sums it all up.

 

The “theory” and process behind it

In short, a MP Store for me is a folder structure on a file server containing all Management Packs that I use in my Management Group(s) (currently and in the past). For more details, please have a look at the part 1 above.
The general process behind the MP store looks like this:

MP-Store-Process
Or short, you can describe creating an MP store like this:
Step 1: Create the MP store
Step 2: Download the MP(s)
Step 3: Store the downloaded MP in a structured way in the MP store

My proposed MP store structure

I use a folder structure like this:
MP-Store-Structure
This structure served me quite well. In comparison with my 2014 suggestion, I changed some template folders in favor of a central Configuration XML and removed some unused MP sub folders, but the rest stayed almost the same. A simple example MP store with only a few MPs could look like that:
MP-Store-Example

 

How can I automate all those steps?

I am a lazy guy and like automation. So I created three scripts to support automating the three steps of creating an MP store. All scripts are published in Technet Gallery and provide a detailed command based help.
Instead of describing their use in greater detail, I have created a short video tutorial which explains its use in action.

Step 1: Create the MP store (and the base Configuration XML)
-> SCOM-MPSTORE-CreateMPStore.ps1

Step 2: Download the MP(s) from MP Wiki (and MP catalog if you wish)
-> SCOM-MPSTORE-DownloadCurrentMSFTMPs.ps1

Step 3: Store the downloaded MP in a structured way in the MP store
-> SCOM-MPSTORE-CopyMPtoStore.ps1

 

Test this approach

So if you want to test my approach, simply do this:

  1. Download all three scripts from Technet Gallery
  2. Watch the Video Tutorial
  3. Pick a root folder for your new MP store like X:\MP-Store
  4. Create the base folder structure with
     SCOM-MPSTORE-CreateMPStore.ps1 -basefolder X:\ -mpstorename “MP-Store”
  5. Download all files from MP Wiki (this can take up to 2h, depending on your connectivity) with
    SCOM-MPSTORE-DownloadCurrentMSFTMPs.ps1 -MPStoreRootFolder X:\MP-Store -DownloadFromMPWiki
  6. Populate the store one MP by another by
    1. Creating a temporary folder structure like this:
      X:\_MPExtract\Source, X:\_MPExtract\Report, X:\_MPExtract\Staging
    2. Copy a MSI file and its MP guide from a folder created in Step 5 to X:\_MPExtract\Source
    3. Run
       SCOM-MPSTORE-CopyMPtoStore.ps1 -MPSourceFolder "X:\_MPEXTRACT\Source"
       -MPReportFolder "X:\_MPEXTRACT\Report"
       -MPstagingRootFolder "X:\_MPEXTRACT\staging"
       -MPStoreRootFolder "X:\MP-Store"
       [If Vendor of the MP is not Microsoft, specifiy the Vendor name]
       [-Vendor "Community"]

That’s it. Of course you could automate step 6 for all downloaded MPs, but that’s maybe part of a later post.

 

Summary

This post recaps my thoughts around a way of storing SCOM Management Packs and how I create such a store.

I am really looking forward for your feedback, so any comments are welcome!

Comments (6)

  1. Peter says:

    Hi,

    I asked on the Technet site but wasn't sure if you would get notified or not so I'll post her as well ( https://gallery.technet.microsoft.com/Universal-MP-and-reporting-7e2dbae6/view/Discussions#content )

    Could this script be altered to work behind a proxy? I.e. fix the 407 proxy authentication required error I get. There is Internet connectivity on the server so all that is needed should be to add the default proxy settings for the server (and authentication). I found this via Google http://stackoverflow.com/questions/15646079/invoke-webrequest-getsystemwebproxy but couldn't get it to work.

    Thanks.

    1. Hi Peter, see my response in Technet Gallery.

      Cheers,
      Dirk

  2. William Thier says:

    Is there a way to use your SCOM-MP-CompareVersionBetweenMGandStore.ps1 script to run against managment packs stored in separate subdirectories?

    For example, i have MPs for Microsoft SQL Server 2014 and Microsoft SQL Server 2005 - 2012 stored in the following directory structures:

    - Microsoft
    | - SQL Server
    | - 2005
    | - 6.7.2.0
    | - 2008
    | - 6.7.2.0
    | - 2012
    | - 6.7.2.0
    | - 2014
    | - 6.7.2.0

    Can i run the SCOM-MP-CompareVersionBetweenMGandStore.ps1 script and have it pick up all management packs in each of the directories?

    Thanks

    1. Hi William,
      most probably yes. I have created a completely revised version of the script, which I will publish in the next weeks. This version basically analyzes ALL MPs found in the score, regardless of the folder structure.

      Cheers,
      Dirk

      1. Very usefull, thank you a lot.
        Do you plan to post the revised SCOM-MP-CompareVersionBetweenMGandStore.ps1 script soon?
        https://blogs.technet.microsoft.com/dirkbri/2015/02/14/how-to-verify-that-all-management-packs-in-a-scom-management-group-are-up-to-date/

Skip to main content