Updated blog style

To all which knew my blog before: I have changed my blog style. I wanted to have a blog with the links on the left side. So I hope you do not get confused now.

SCOM 2012: Upgrade bug – Health service ping diagnostic fails

Upgrading such a complex product as System Center Operations Manager is a big effort. Some things can be missed. Microsoft seems to have missed to exchange the entries for the HealthServiceWatchersGroup classes during the upgrade from SCOM 2007 R2 to SCOM 2012.

The HealthServiceWatchersGroup references the RMS in 2007 R2 and the RMS emulator in 2012.
You can check that with this query:
select *
from MTV_HealthServiceWatchersGroup

Also after the upgrade you will find the old entries:

WatcherGroupName_A4C8B023_4CFC_52CC_30B7_6C1B959C4723 RMSPrincipalName_A4C8B023_4CFC_52CC_30B7_6C1B959C4723
Microsoft.SystemCenter.CollectionManagementServerWatchersGroup oldrms.abc.def
Microsoft.SystemCenter.AgentWatchersGroup oldrms.abc.def

 Or in the Discovered Inventory view (target: Health Service Watcher Group): 


The HealthServiceWatchersGroup is used for example in the ping diagnostic when an health service has problems and the alert “Health Service Heartbeat Failure” has been created. With the old entry the diagnostic fails, because the HealthServiceWatchersGroup is still referencing the old RMS server – which is not existing in 2012 anymore.

Beside the “Health Service Heartbeat Failure” alert you will see the “Failed to Connect to Computer” alert created also if the agent can be pinged.


You can see the reason in the Health Explorer of the Health Service Heartbeat Failure alert. Check the output of the “Ping Computer on Heartbeat Failure” Diagnostic:


The ErrorMessage is “Unable to create automation object ‘winmgmts: {impersonationLevel=impersonate}! \\oldrms.abc.def\root\CIMv2’“. It tries to connect through WMI to the old RMS to run the ping!

How can this be solved?

Perform the following steps:

  1. Stop all SCOM services on the management servers
  2. Perform a backup of your OperationsManager database
  3. Run the following query:
    UPDATE MTV_HealthServiceWatchersGroup
    SET RMSPrincipalName_A4C8B023_4CFC_52CC_30B7_6C1B959C4723 = ‘RMSEmulator_FQDN’
    WHERE RMSPrincipalName_A4C8B023_4CFC_52CC_30B7_6C1B959C4723 = ‘oldrms.abc.def’
    Exchange the ‘RMSEmulator_FQDN’ with the full qualified name of the management server with the RMS emulator role.
  4. Start all SCOM services on the management servers again.

Now the diagnostic should run successfully again.

Microsoft will need to add that to the upgrade process.

OpsManager: Disable SCOM agent task

One of the regulary MOB tasks in SCOM is to remove agents from monitoring.

If the security setting in the Global Management Server Settings is set to “Review new manual agent installations in pending management view” and you have not set the checkmark before “Automatically approve new manually installed agents” then you will see deleted agents popping up again in the pending management view until the server is decomissioned or the service is stopped. Also you will see 20000 events in the OpsManager event log on the management servers.
In a bigger environment this can be too much unnecessary noise.

The easiest way to avoid that is to stop and disable the System Center Management service on the agent prior to deleting it out of the console. An agent based task can help doing that through the console. This task can be created directly in the console in a SCOM 2007 R2 or a SCOM 2012 environment and you can also use an unsealed management pack for it.

The sc.exe must be available on the server, where you run the task. Normally it is located in %windir%\system32.

Here are the steps to create the task: 

Open the OpsManager console and go to Authoring: Management Pack Objects: Tasks.

Click on “Create a New Task”.


Select Agent Task: Run a script.

Select an existing management pack or create a new one.

Click Next.


Give it a name and a description. Example: Disable SCOM agent.

Select a target. I recommend to use Agent, then it does not pop up in the Windows Computers view but in the views below Operations Manager.

Click Next.


Enter a name for the script. Example: disablescom.vbs.

You can leave the default timeout (1 min), because it normally should only run some seconds.

Enter the following lines in the script area:

Set WshShell = WScript.CreateObject(“WScript.Shell”)
WshShell.Run “%windir%\system32\sc.exe config healthservice start= disabled” 
WshShell.Run “%windir%\system32\sc.exe stop healthservice”

Click Create.

Now the task gets created and you should find the new task if you go to the monitoring area and select a server in a state view below the Operations Manager: Agent Details folder.


After running the task on an agent the service is stopped and disabled. Now you can go on and delete the agent out of the console.