Discussion Locked

Members of a Active Directory Group

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi,
We have a Windows 2003 Domain Controller in our Oganization, with 2 domains (US & IN) at 2 sites (USA & India).

We have several "Universal Groups" created at the domain US which have members from both US & IN domains.

From the command prompt when I issue "net group grp1 /domain" at US domain, it only shows those users who are members of "grp1" at domain US. If I need to know all the users at domain US & IN who are members of "grp1", the only option I have (or rather that I know of) is to use the "Active Directory Users & Computers" GUI from the AdminPack.

Is there a simpler way to achieve the same result from a command prompt or from scripting languages like Perl?

1 reply

by lowlands

I can't try this because I only have one domain, but a few things to try:

use showmbrs.exe
use a vbscript
On Error Resume Next

Set objGroup = GetObject _
("LDAP://cn=groupname,ou=ouname,dc=example,dc=com")
objGroup.GetInfo

arrMemberOf = objGroup.GetEx("member")

WScript.Echo "Members:"
For Each strMember in arrMemberOf
WScript.echo strMember
Next

This discussion is closed to new replies.