SharePoint 2010 MP : how to automate the SharePointMP.Config configuration

Dear all,

If you already installed the SharePoint 2010 management pack for Operations Manager 2007, you know that this management pack requires the some extra configuration with a file named SharePointMP.Config

First, I invite you to take a look to the following post to help you to understand how the SharePoint 2010 management pack works :

http://blogs.technet.com/b/berryst/archive/2011/03/25/configuring-scom-r2-management-pack-for-sharepoint-2010-foundation-monitoring.aspx

In fact, It’s quite simple, each time that a server is added to a SharePoint farm, it has to be added to the SharePointMP.Config XML file, like the example below :image

and to complete the configuration, the Operations Manager task “Configure SharePoint Management Pack” must be also started from the Operations Manager Console.
image

Unfortunately, these both actions have to be done manually and each time that a SharePoint server is added to a SharePoint farm…. not really nice…. So let’s try to automate that with PowerShell Smile

First part of the Script, we define the variables :
image

The script connects to each Central Admin SharePoint server that you defined in the variables, to retrieve the complete servers list of each SharePoint farms.
image

The script is now building the SharePointMP.Config XML file and will copy it to the %ProgramFiles%System Center Management Packs folder on the RMS.image

Last step is to start the “Configure SharePoint Management Pack” task in Operations Manager, like you could do it in the Operations Console.
image

The following script has some requirements about the service account that it will use to run :

  • local admin on all SP2010 Front End and Application servers
  • local admin on all SQL boxes that host SharePoint 2010 Databases
  • local admin on Operations Manager Root Management server
  • Operations Manager Administrator
  • dbo for the actual SharePoint databases
  • full farm admin rights within SharePoint 2010

Normally, most of this requirements are already meet with the installation of the SharePoint management pack itself.

The script is limited to the use of the default “SharePoint Discovery/Monitoring Account” Operations Manager Run As Account.

To summary, you have to run this script, on the RMS, every time that you added a server into a SharePoint Farm. Tips : Create a schedule task and run it once per day…. no more manual action to do.

Let’s try to run the script manually :
image

The xml file is built :
image

The task successfully ran:
image

The SharePoint 2010 management pack configuration is now completed and fully automated.

The complete script is available here : DOWNLOAD
Use it at your own risk, feel free to modify it and distribute it.

Regards
Christopher Keyaert

clip_image001 clip_image002 clip_image004 clip_image005 clip_image007 clip_image008

Tweet about this on TwitterShare on FacebookShare on LinkedInShare on Google+Email this to someoneShare on TumblrPin on PinterestDigg thisShare on RedditFlattr the authorBuffer this pageShare on StumbleUpon

About Christopher Keyaert

Christopher Keyaert is a Consultant, focused on helping partners to leverage the System Center and Microsoft Azure cloud platform. He is also a Microsoft Most Valuable Professional (MVP) for Cloud and Data Center Management and a Microsoft Certified Trainer (MCT).
This entry was posted in Uncategorized. Bookmark the permalink.

One Response to SharePoint 2010 MP : how to automate the SharePointMP.Config configuration

  1. Pingback: SCOM 2012: Overview link blog - SysManBlog

Leave a Reply

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