Domain Local Group member listing by user ID

  • Thread starter Thread starter bobk
  • Start date Start date
B

bobk

Anyone have a script/tool to list out the user IDs of a domain local group,
including (those inside) any nested global groups? Something like this
would be great:

ImportantFolder_LocalChange:
JWalkerson - Jeff Walkerson
TThompson - Tom Thompson
LBKing - Larry B. King
Chicago_SpecialAccess_ImportantFolder_GlobalChange:
TCruz - Tom Cruz
JLo - Julie Lo
TDiggins - Ty Diggins
NewYork_SpecialAccess_ImportantFolder_GlobalChange:
FMasters - Frank Masters
Detroit_SpecialAccess_ImportantFolder_GlobalReadOnly:
EBFordson - Elvis B. Fordson
JDandy - James Dandy
BBKing - B.B. King
MLHarrison - Mary Lou Harrison
 
This will list all members in a group, edit it as you see fit.

<snip>
Set rootDSE = GetObject("LDAP://rootDSE")
domainContainer = rootDSE.Get("DefaultNamingContext")
Set grp = GetObject("LDAP://CN=domain admins,CN=users," & domainContainer)
Set mList = grp.members
For Each member In mList
WScript.Echo member.Name
Next
<snip>

Regards,
/Jimmy
 
Back
Top