Using SMA to Building Your Own Microsoft OpsMgr Management Pack Catalog On SharePoint 2013
Background
Over the years that I’ve been working with OpsMgr, for me, the Microsoft Pinpoint MP Catalog was a one stop shop for getting Microsoft management packs. More information about the Pinpoint MP Catalog can be found in Marnix’s post: http://thoughtsonopsmgr.blogspot.com.au/2010/07/pinpoint-management-pack-catalog.html
Based on the information came out in TechEd Europe 2014, looks like there will be changes introduced to the System Center Pinpoint site (http://channel9.msdn.com/Events/TechEd/Europe/2014/Ch9-34, from 09:00 onwards). And it seems the link from Marnix’s post https://pinpoint.microsoft.com/systemcenter is no longer valid.
So I’ve decided to do some experiment, see if I can generate and maintain a Microsoft MP catalog on-premise, for myself – Something I’ve always wanted. It took me couple of days, and I managed to build a MP catalog on a SharePoint 2013 site using PowerShell, SMA, and some existing scripts from the System Center community. The End result looks like this:
Currently, this catalog contains 1404 entries, and it is generated by 2 SMA runbooks that I have developed. In this post, I will go through the steps I took to setup this solution.
1. Creating a SharePoint 2013 List
Firstly, I created a list on my SharePoint 2013 site and called it “MP Catalog”:
Once the list is created, go to** Site Settings** then “Site libraries and lists”
Choose Customize “MP Catalog” and click on column “Title”
Rename this column to “System Name”
Add the following additional columns:
- Categories
- Catalog Item Id
- MP Version
- Public Key
- Version Independent GUID
- Download Link
- Release Date
For each of these additional columns, please make sure** “Require that this column contains information”** is set to “No”.
Note: the internal names of these columns would be different than these display names. The script in the SMA runbook will translate these display names to the actual internal names. So it doesn’t matter how you created these columns, as long as the display names are exactly the same as what I listed, it should be OK.
02. Create a Runbook to Retrieve Microsoft OpsMgr Management Packs Info
We have all used the “Download Management Packs” function in the OpsMgr console:
Michel Kamp has written a MP that checks updated management packs. This MP utilize the same web service as what “Download Management Packs” wizard uses. I have used some PowerShell code from Michel’s MP in this runbook. – Thank you, Michel.
I called this runbook Get-MSMPCatalog:
This runbook will be called by another runbook, and it returns an arraylist as output.
03. Create a Runbook to Populate the SharePoint List
I created a second runbook to call the first runbook Get-MSMPCatalog, then workout which MPs are not on the SharePoint List, and add the missing ones. I called the second Runbook Populate-OnPremMPCatalog:
Download Populate-OnPremMPCatalog
As you can see, this runbook is expecting 5 parameters:
- SharePointSiteURL – URL of the SharePoint site (in my lab, its http://sharepoint01/sites/requests)
- SavedCredentialName – A credential saved in SMA that has access to the SharePoint site. In my lab, I created an AD service account and assigned it as a member in the SharePoint site.
- List Name – The list for the MP catalog. In my lab, it’s “MP Catalog”
- NotifyByEmail – Specify if you’d like an email notification when new MPs have been added to the catalog.
- ContactName – If NotifyByEmail is set to “true”, specify the SMAAddressBook connection name for the email notification recipient.
Note: If you’d like to receive email notifications, you also need to import and configure the SendEmail and SendPushNotification modules from my blog. Once the SMTP server connection and the Address book connection are created, please modify line 121 of the Populate-OnPremMPCatalog runbook with the name of your SMTP server’s SMA connection:
i.e. My SMTP connection and SMAAddress book connection:
04. Execute Runbook Populate-OnPremMPCatalog
When executing this runbook, you will need to fill out some parameters as listed above:
The first run will take a long time (in my lab, over 1 hour), but any subsequent executions shouldn’t take long at all. i.e. I deleted 204 MPs from the SharePoint list, and execute it again:
I have also created a schedule to execute this runbook daily. This is to make my catalog in sync with Microsoft’s, and notify me when new MPs are released.
Customizing the MP Catalog SharePoint List
You may not like the default view of the MP Catalog list. You may want to hide some of the columns. This can be easily done by customising the default view of the list, or creating new views.
Conclusion
I’ve always wanted a place where I can simply click on a link to download a particular management pack. I have made this possible by using SMA and SharePoint. The only downside is, only individual management packs are listed. They are not bundled, and no documentations available.
There is also a MP Catalog wiki page on TechNet: https://social.technet.microsoft.com/wiki/contents/articles/16174.microsoft-management-packs.aspx, it is maintained by Microsoft and few System Center MVPs. You should be able to find all the recent MS management packs from there as well.
I have also managed to populate this catalog on a SharePoint Online (Office 365) site using Azure Automation – a 100% cloud based solution. For the cloud based version, one of the runbooks is completely different due to the differences in SharePoint APIs (SharePoint 2013 vs. SharePoint Online). I will post it in few days.
Credit
Thanks for all the System Center MVPs who have provided input and feedback on this topic. You know who you are, much appreciated!
Lastly, please feel free to contact me if you have anything to add on this topic. I’d love to hear from you.
Leave a comment