Created with PrimalScript 2007 http://www.primalscript.com
Jeffery D. Hicks
jhicks@jdhitsolutions.com
http://www.scriptinganswers.com
http://jdhitsolutions.blogspot.com
*********************************************************************************
* DO NOT USE IN A PRODUCTION ENVIRONMENT UNTIL YOU HAVE TESTED IN A SECURED LAB *
* OR NON-PRODUCTION SETTING. USE AT YOUR OWN RISK. *
*********************************************************************************
GroupReporterCLI.wsf v1.2
This is a command line version of the Mr. Roboto Group Reporter HTA. You
can use this tool to enumerate all groups and their members on either
a specified domain member, a list of computers or all groups within a
given Active Directory container.
If you specify a computer name or a list of computers all the local
groups will be enumerated.
When you specify a container or organizational unit, then all groups
within that container will be enumerated. You can choose to only
enumerate groups of a certain type. Valid options are Security,
Distribution or *. The default is * for all groups.
You can also elect to expand nested groups by specifying /expand.
The default setting is NOT to expand nested groups.
You can use /E and specify a text file to export the results to a text
file. Nothing will be displayed on the screen. Any existing files with
the same name will be overwritten.
Examples:
cscript GroupReporterCLI /S:Server02
cscript GroupReporterCLI /L:servers.txt
cscript GroupReporterCLI /DN:DC=domain,DC=com /recurse /expand
cscript GroupReporterCLI /DN:DC=domain,DC=com /recurse /expand /e:group-report.txt
cscript GroupReporterCLI /DN:OU=MyGroups,DC=domain,DC=com /recurse /t:security /expand
cscript GroupReporterCLI /?
will display this help information.