In Operations Manager, you can create a script that can retrieve a management group or a collection of management groups from the agent.
Example
The following is an example script, which is written in VBScript, that displays information about management groups. For more information about parameters, return values, usage, and errors, see GetManagementGroups Method or GetManagementGroup Method.
Option Explicit Dim objMSConfig Set objMSConfig = CreateObject("AgentConfigManager.MgmtSvcCfg") 'Get a management group and display the server name Dim objMG Set objMG = objMSConfig.GetManagementGroup ("MyManagementGroupToGet”) MsgBox objMG.ManagementGroupServer 'Get all management groups and display the port Dim collMG Set collMG = objMSConfig.GetManagementGroups() 'Enumerate the collection Dim mgItem For Each mgItem In collMG MsgBox CInt(objMG.ManagementServerPort) Next