The query I specified below will export all groups and there members regardless of name.  If you want to get more specific with the query, you definitely can.  The example below will dump the members for only the “Domain Admins” group:

 

dsquery * forestroot -scope subtree -filter "&(objectCategory=group)(name=Domain Admins)" -attr name member -r -limit 100000

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Harding, Devon
Sent: Friday, September 17, 2004 7:21 AM
To: [EMAIL PROTECTED]
Subject: RE: [ActiveDir] AD Group Export GUI?

 

How do I run this (dsquery) against a group with a space in its name?

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bernard, Aric
Sent: Thursday, September 16, 2004 6:14 PM
To: [EMAIL PROTECTED]
Subject: RE: [ActiveDir] AD Group Export GUI?

 

FYI – using the RDN (group) should also work for objectCategory. ;-}

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bernard, Aric
Sent: Thursday, September 16, 2004 3:03 PM
To: [EMAIL PROTECTED]
Subject: RE: [ActiveDir] AD Group Export GUI?

 

From a command line (or batch file) you could use the following command:

 

dsquery * forestroot -scope subtree -filter (objectClass=group) -attr name member -r -limit 100000 > MyGroupMembers.txt

 

This will create a tab delimited file with the first field holding the name of the group and the second field holding the DN of each member separated by a semicolon.

 

The only requirement for this command is that you must have the dsquery tool on the system it is run from.  The tool comes native with Windows 2003 and can be installed on other machines by simply copying the executable or by installing the adminpak (or support tools – cannot remember for sure) from the W2K3 CD.

 

Aric

 

P.S. for those LDAP query purists, you should probably use the objectCategory class instead as it is indexed, however the class syntax must instead be a DN such as CN=Group,CN=Schema,CN=Configuration,DC=MyDomain,DC=com.  If your forest is relatively small and you have relatively few groups the objectClass will work fine.

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Harding, Devon
Sent: Thursday, September 16, 2004 2:39 PM
To: [EMAIL PROTECTED]
Subject: RE: [ActiveDir] AD Group Export GUI?

 

I get this…

 

 

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mulnick, Al
Sent: Thursday, September 16, 2004 5:19 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [ActiveDir] AD Group Export GUI?

 

I like this myself. ;)

http://www.houseofqueues.com//CodeSamples/FindMembers.html

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Harding, Devon
Sent: Thursday, September 16, 2004 4:48 PM
To: [EMAIL PROTECTED]
Subject: [ActiveDir] AD Group Export GUI?

Is there a GUI or easy way to export AD group members to a text or csv list?

 

Devon Harding

Windows Systems Engineer

Southern Wine & Spirits - GSD

954-602-2469

 


__________________________________
This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use or distribution of the information included in the message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank You.


__________________________________
This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use or distribution of the information included in the message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank You.


__________________________________
This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use or distribution of the information included in the message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank You.

Reply via email to