SystemCenter

All about System Center Articles and Tutorials

ENABLE “Change Primary Management Server” OPTION IN SCOM

Posted by on Jul 26, 2016 in SCOM 2012, SQL

ENABLE “Change Primary Management Server” OPTION IN SCOM

Recently one of my clients installed few SCOM agents manually and provided the Management Server address which they have kept to manage other servers. Now they wanted to change the Management Server for those manually installed agents in SCOM.

They approached me to change the Management Server for those agents as they were not getting option to change it since it was grayed out because of manually installed agents.

I decided to enable the Change Primary Management Server option through SQL so can move the agents to the correct Management Server.

Initially when I checked Remotely Manageable status on SCOM console, it was No and the below options were grayed out:

  • Change Primary Management Server
  • Repair…
  • Uninstall…

1

There is no way we can enable these options through GUI. So, if we need to make these options enable, we need to run queries in SQL (Operations Manager DB).

Check the Agents which are set as manually installed:

select bme.DisplayName from MT_HealthService mths
INNER JOIN BaseManagedEntity bme on bme.BaseManagedEntityId = mths.BaseManagedEntityId where IsManuallyInstalled = 1

Set the agents back to “Remotely Manageable = Yes” for specific agent/agents:

UPDATE MT_HealthService 
SET IsManuallyInstalled=0
WHERE IsManuallyInstalled=1
AND BaseManagedEntityId IN
(select BaseManagedEntityID from BaseManagedEntity
where BaseManagedTypeId = ‘AB4C891F-3359-3FB6-0704-075FBFE36710’
AND DisplayName = 
‘servername.domain.com’)

Example:

2

If you need to set “ALL” the agents back to Remotely Manageable, you can run below query:

UPDATE MT_HealthService
SET IsManuallyInstalled=0
WHERE IsManuallyInstalled=1

After changing the agents back to Remotely Manageable, we can see the options are enabled.

We can move the agents to other Management Server by clicking Change Primary Management Server option and selecting respective Management Server from the list.

3

Kevin Holman has very well explained these queries in his Blog, you can refer below link for same:

https://blogs.technet.microsoft.com/kevinholman/2010/02/20/how-to-get-your-agents-back-to-remotely-manageable-in-opsmgr-2007-r2/

Although the blog was written for System Center Operations Manger 2007 R2 however it works flawlessly on SCOM 2012 as well.