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

February 23, 2012 at 4:01 pm in Uncategorized by Christopher Keyaert

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 :

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.

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 :

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.

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.

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 :

The xml file is built :

The task successfully ran:

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.

Christopher Keyaert

clip_image001 clip_image002 clip_image004 clip_image005 clip_image007 clip_image008