Export member lists of Active Directory groups

G

Guest

I need to export to an HTML or text file a complete list of domain users and
members within a few specific groups. Is this possible?

Thanks.
 
T

Tomasz Onyszko

TomG said:
I need to export to an HTML or text file a complete list of domain users and
members within a few specific groups. Is this possible?


From TechNet ScriptCenter:
Returning a List of Group Members
Description
Returns the members of an Active Directory group named Scientists.

--------------------------
On Error Resume Next

Set objGroup = GetObject _
("LDAP://cn=Scientists,ou=R&D,dc=NA,dc=fabrikam,dc=com")
objGroup.GetInfo

arrMemberOf = objGroup.GetEx("member")

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

This script will do this for You - with a little modification You can
access other users properties and write it to file. To write data to
file You can user FileSystemObject

You can also get this data with dsquery and dsget :) and redirect output
to file:
http://www.microsoft.com/windowsxp/...wsxp/home/using/productdoc/en/dsget_group.asp
 
G

Guest

if you just want to export to txt:

Click on the filter button, Choose field User - then group membership,
conditions: Is (exactly) and the value is the DN of the group you are after.

The results will be displayed and you can export to txt file

E
 
C

Cary Shultz [A.D. MVP]

TomG,

As others have stated, this is very possible. If you can not script there
is a lovely little built-in tool called ldifde that will allow you to do
exactly what you need. You might want to look into this - it is helpful in
a lot of ways.

HTH,

Cary
 
C

Cary Shultz [A.D. MVP]

It is built-in to the Windows Server OS. IIRC, it is in C:\WINNT\SYSTEM32
( on WIN2000 ) or C:\WINDOWS\SYSTEM32 ( on WIN2003 ).

It does have a rather unforgiving syntax, but once you learn how to use it
you will find that there are a lot of things that you can do. ADModify is
also a very nice tool that will do a lot of the things that ldifde does -
only better and faster. But, that does not negate the need for ldifde.
Also, in WIN2003 we have the ds* tools ( dsget, dsquery, et al ) that are
really very nice.

An example of what you can do with ldifde is to get all of the computer
account objects broken down by both Operating System as well as Service Pack
level. Granted, you could do this with WMI ( scripting ) but you need to
know how to use WMI to do that. It is not all that easy! With ldifde it is
significantly easier.

An example of where you would want to use ADModfy would be if you needed to
add the complete address of the company to each and every user's account.
You could do this with ldifde, but it is a bit involved. With ADModify it
takes all of 15 seconds! Very nice and very easy!

Here is a link to ADModify:

ftp://ftp.microsoft.com/PSS/Tools/Exchange%20Support%20Tools/ADModify/

HTH,

Cary
 
P

ptwilliams

Robbie Allen has some LDIFDE examples, although you'll need to buy the
excellent AD Cookbook for help on how to use them.

--
http://www.rallenhome.com/books/adcookbook/src/04.25-importing_objects_with_ldif.ldf.txt
--
http://www.rallenhome.com/books/adcookbook/src/04.11-modify_object.ldf.txt


--

Paul Williams

http://www.msresource.net
http://forums.msresource.net


It is built-in to the Windows Server OS. IIRC, it is in C:\WINNT\SYSTEM32
( on WIN2000 ) or C:\WINDOWS\SYSTEM32 ( on WIN2003 ).

It does have a rather unforgiving syntax, but once you learn how to use it
you will find that there are a lot of things that you can do. ADModify is
also a very nice tool that will do a lot of the things that ldifde does -
only better and faster. But, that does not negate the need for ldifde.
Also, in WIN2003 we have the ds* tools ( dsget, dsquery, et al ) that are
really very nice.

An example of what you can do with ldifde is to get all of the computer
account objects broken down by both Operating System as well as Service Pack
level. Granted, you could do this with WMI ( scripting ) but you need to
know how to use WMI to do that. It is not all that easy! With ldifde it is
significantly easier.

An example of where you would want to use ADModfy would be if you needed to
add the complete address of the company to each and every user's account.
You could do this with ldifde, but it is a bit involved. With ADModify it
takes all of 15 seconds! Very nice and very easy!

Here is a link to ADModify:

ftp://ftp.microsoft.com/PSS/Tools/Exchange%20Support%20Tools/ADModify/

HTH,

Cary
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top