Applies To: System Center 2012 - Operations Manager
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
This posting is provided "AS IS" with no warranties.
No comments:
Post a Comment