From a question in the AM forum - attached is a VB Script that will list servers in the specified Management Group from Control Center. Execute this using cscript - for example:-
c:\> cscript AMExportMGServers.vbs
There are a number of input parameters/switches to use. These are:-
' /server: CCDB Server. Default is localhost
' /db: CCDB database name. Default is NQCCDB
' /uid: SQL Login, deault blank (ie Windows Authentication)
' /pwd: SQL Password
' /mgname: Management Group Name, default Master (any MG Name that includes spaces or "odd" charaters enclose in quotes, ie "My Group"
' /out: Output file. If that cannot be created or is empty, output is to console
' /headers: Include column headers as the first row - default is 1 (include). Set to 0 to exclude
' /fields: Fields to use (enclose in quotes). If empty, the default "DataSourceName,ObjID,Computer,JobCount,EventSeverity" will be used
So for example:-
c:\> cscript AMExportMGServers.vbs /server:MYSERVER /fields:"Computer,JobCount,EventSeverity" /out:serverlist.csv
Would generate a csv file with a list of all servers and their job count. with event severity and place it in a csv file called "serverlist.csv". The first row would contain the headers.
If there is more than one MG of the same name, the first in the list will be used,