I am looking for help writing a vbScript or batch file that will use something like ADO, ADSystemInfo or dsquery and dsget to bind to my domain and enumerate a list of all groups in the domain with two or less members in the group. Once the list of groups is obtained I would like to write the results to a text file showing:
1) Group Name and FQDN
2) Group Members
3) Date Created
We are in the process of cleaning up our Active Directory with old, unused or obsolete objects and this is part of that effort.
Thanks in advance for your help.
Page 1 of 1
vbScript or batch script to find AD groups with two members or less
#2
Posted 08 October 2011 - 08:47 AM
I'd export all groups (of course as i don't know you ad structure, it could be the worst approach if your ad contains a lot of groups) with adfind or a dsquery and their members, then count each the number of members in each groups.
But perhaps it might be doable with as single dsquery -filter and the right ldap request.
But perhaps it might be doable with as single dsquery -filter and the right ldap request.
This post has been edited by allen2: 08 October 2011 - 08:47 AM
- ← CMD Batch: Get Time
- Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
- Script to find and document unlinked GPO objects →
Share this topic:
Page 1 of 1



Help

Back to top








