List servers from specified Management Group


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,

NetIQ does not test or validate any software, code or other materials provided in, on or through NetIQ Cool Solutions (collectively, "Materials"), so please use caution when downloading or accessing any Materials from Cool Solutions and ensure that you have reasonable and current security, spyware and anti-virus measures in place on your computer and/or network prior to downloading. Additionally, do not use any Materials downloaded from Cool Solutions in any production environment without first testing the Materials to ensure they are compatible with your version of NetIQ software or any other hardware or software present in your network or environment. Cool Solutions is not a substitute for authorized NetIQ support and should not be used as such. NETIQ COOL SOLUTIONS AND ANY MATERIALS ARE PROVIDED ON AN AS-IS, AS-AVAILABLE BASIS WITHOUT ANY WARRANTY OF ANY KIND. By downloading this file, you are agreeing to these terms of use. To report a problem please contact: Your use of Cool Solutions is governed by the Cool Solutions Terms and Conditions.


How To-Best Practice
Comment List