Manage multiple Management Groups with PowerShell

Sometimes we have more than one Management Group (MG), production, test and maybe a development environment. When opening the Operations Manager Console it connects with the last MG you were connected to. This is controlled by the registry value SDKServiceMachine in HKEY_CURRENT_USER\Software\Microsoft\Microsoft Operations Manager\3.0\User Settings

If we want to control this, there is a switch when opening console:
Microsoft.MOM.UI.Console.exe /


So for the console we can create different shortcuts for the MG’s with the switch..

When it comes to the Operations Manager Shell there isn’t any switch to do it the “easy way”. I do like this:

First I makes as many copy’s of the file Microsoft.EnterpriseManagement.OperationsManager.ClientShell.Startup.ps1 as I have Management Groups. Renaming them to the different MG names, for example:
Microsoft.EnterpriseManagement.OperationsManager.ClientShell.StartupOPSMGRdev.ps1 for my development environment.

Second I open the ..StartupOPSMGRdev.ps1-file in my preferred editor and change line 10


Just adding your RMS fqdn (remove : “”)

Third I make a copy of the Operations Manager Shell shortcut for every MG and change the .Startup.ps1 to the name you gave the Startup file, in my case it will be:


So now I have a shortcut for every Management Group in my environment.


Cory Delamarter have written a post on the same subject but with an other angle.
Check it out here:

Written on March 5, 2011