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:

Microsoft Community Contributor Award

In my mail today I found out that I have been awarded with the Microsoft Community Contributor Award.






I’m really glad to get this kind of recognition!

So what is the MCC Award you ask.. Microsoft Community Contributor Award

How-To handle application teams in Operations Manager

This scenario is quite common here in Sweden and I get questions like this from customers and in forums.

We have one team that administrates the infrastructure, Active Directory, MS Exchange, SQL server, Operations Manager etc. Then we have a application team that operates the business applications, for example Microsoft Dynamics CRM and a web application called DinnerNow.

The application team wants to be able to see alerts and status as well as changing thresholds and doing overrides on "their" applications and all dependencies like storage, databases and web sites in the OpsMgr console. On top of that they also wants to get notified trough e-mail in non business hours.

So in this case we focus on the group that is administrating DinnerNow and Dynamics CRM.
First we need some groups, I’ve created one main group (OpsMode Application Team) with 8 subgroups containing the various components of Dynamics CRM and DinnerNow.


  • DinnerNow Databases, contains objects from the SQL 2008 Database class
  • DinnerNow Storage and logging, contains objects from the Ubuntu server class
  • DinnerNow Web sites, contains objects from the IIS7 Web sites class
  • Dynamics CRM Application Servers, contains objects from the Microsoft Dynamics CRM 4.0 Server class
  • Dynamics CRM Data Disk, contains objects from the Logical Disk class
  • Dynamics CRM SQL components, contains objects from the SQL 2008 Database and SQL 2008 Agent Job class
  • Dynamics CRM Web sites, contains objects from the IIS 7 Web sites class
  • Dynamics CRM Windows Servers, contains objects from the Windows Computer class

Second we need to create a User Role. I base this User Role on the Advanced Operator role, because the team need to do overrides and similar.

The Advanced Operator profile includes a set of privileges designed for users that need access to limited tweaking of monitoring
configuration in addition to the Operators privileges. A role based on the Advanced Operators profile grants members the ability to override the configuration of rules and monitors for specific targets or groups of targets within the configured scope.

I name the user role, and add the members of the team. In this case its Marsellus Wallace and Vincent Vega.


Then I chose what groups this user role will be able to handle.


When choosing what views will be available I also check Active Alerts, Windows Computers, Microsoft SQL Server, Microsoft Windows Internet Information Services and Microsoft Windows Server.


I then finish the wizard. (All the settings set in the wizard can later be changed if we would like.)
Now we have a new User Role:


And if I now log on the console with the user Vincent Vega I now only see the views we chose in the User Role Wizard.


We can create overrides on all management packs but only to computers that are members of a group that we chose in the wizard.
When doing an override for a group, we only get to chose from the groups chosen earlier.



So now the team can view and take care of the monitoring in the Console. They also wants to get critical alerts through e-mail on times they are not in front of a console, ie non office hours.

So to set this up we can use the groups created earlier. I assume that you have a working Notification Channel and your subscribers all set up, otherwise check these:

How to Create and Configure the Notification Action Account

Enable an E-mail Notification Channel

Create Notification Subscribers

Creating a criteria for the subscription, it could look like this.


This will send New Critical alerts from all the above groups classes to the subscriber.

Putting Unix/Linux servers in MM with Powershell

I saw a question in the TechNet forum today on how to schedule Maintenance mode for Unix/Linux servers.
After some testing this powershell script came out, put it in the task scheduler to automate it, or even better put it in the Opalis policy that is taking care of your maintenance..

add-pssnapin “Microsoft.EnterpriseManagement.OperationsManager.Client”;
Set-Location “OperationsManagerMonitoring::”;
$mgConnection = New-ManagementGroupConnection -connectionString:$rmsServer;

Set-Location $rmsServer;

$unixClass = get-monitoringclass -name "Microsoft.Unix.Computer"
$monObject = Get-MonitoringObject -monitoringclass:$unixClass
$mmServer = $monObject | where {$_.displayname -eq "unixserver.fqdn"}

New-MaintenanceWindow -MonitoringObject $mmServer -Comment "Enter maintenance mode reason here" -StartTime (Get-Date) -EndTime (Get-Date).AddMinutes(60)

Whats running on the agent…?

Ever wanted to now what rules, monitors and discoveries is running on the OpsMgr agent? I sure did..

Now the answer is a great Powershell script written by Stefan Stranger.

It is to be found here:

Opalis 6.3 now RTM and downloadable

In case anybody missed it, Opalis 6.3 is now RTM and ready to be downloaded. Here is the download links from the Opalis website
Download the free 180-day trial version of Opalis 6.3.
Download the Opalis 6.3 Upgrade Package (for customers with qualifying SMSE and SMSD licenses only).
Download the full Opalis 6.3 with 6.2.2 package (for customers with qualifying SMSE and SMSD licenses only).

Here is som release-interviews with the Engineering team

In the package are Integrations Packs for SCCM, DPM, OpsMgr, SCSM and SCVMM.

I’m really looking forward to start using this new version and IP’s!

Happy automating.. =)

Making Gateway approval easier

I am right now deploying a lot of Gateway servers so to make the Gateway approval a little easier I wrote a little script.
There is probably some way of doing this even better, but here goes:

$MS = Read-Host “FQDN of the Management Server”
$GW = Read-Host “FQDN of the Gateway”
$Site = Read-Host “Name of the site”

& “Microsoft.EnterpriseManagement.GatewayApprovalTool.exe” /ManagementServerName=$MS /GateWayName=$GW /Site=$Site /Action=Create”

When using the GateWayApprovalTool you need to have Write Permissions on the SQL Instance that holds the OpsMgr database.

Microsoft TechEd Europe 2010

For us that wasn’t able to attend Microsoft TechEd Europe 2010 this year, here is a couple of recorded sessions on OpsMgr for us.

Extending System Center Operations Manager with AVIcode Application Monitoring

Managing the Heterogeneous Environment Through X-plat and 3rd Party Integration

Introducing the Next Generation of System Center Operations Manager

What’s New in Operations Manager Since R2

Please let me know if I missed any session that should be in this post!

Opalis and OpsMgr versions

Word is that we will se Opalis 6.3 on 25th of November. Support for installing on Windows server 2008 and integration packs for more System Center products is the news there.

When it comes to the vNext versions of both Opalis and OpsMgr they will probably be releases under the names System Center Opalis 2012 and System Center Operations Manager 2012.

A little more here:

Problem with the MP catalog

According to a post in the TechNet Forums there is some problems with the PinPoint MP catalog.