Export (0) Print
Expand All

How to Display Management Group Information

System Center

Updated: January 31, 2012

Applies To: System Center 2012 - Operations Manager

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

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


See Also

 

Community Additions

ADD
Show:
© 2014 Microsoft