Export distribution lists to csv?

G

Guest

We have a loads of Security and Distribution lists and I sometimes would just
like to export just the contents of one of these groups to csv, showing all
their info. Can I do this? I don't want to do a usual full dump of AD.
 
J

Jerold Schulman

We have a loads of Security and Distribution lists and I sometimes would just
like to export just the contents of one of these groups to csv, showing all
their info. Can I do this? I don't want to do a usual full dump of AD.

See tip 6820 » What are the new Active Directory command-line tools in Windows Server 2003?
in the 'Tips & Tricks' at http://www.jsifaq.com

Well it's not a csv format, but using the Active Directory command-line tools which you can run from a Windows XP domain member, type on 1 line:

dsget group "CN=Accounts Payables,CN=Users,DC=JSIINC,DC=COM" -members|dsget user -dn -samid -sid -upn -fn -mi -ln -display -empid -desc -office -tel -email -hometel -pager -mobile -fax -iptel -webpg -title -dept -company -mgr -hmdir -hmdrv
-profile -loscr

Here is the headings of the output list:

dn desc samid sid upn fn mi ln display empid office tel email
hometel pager mobile fax iptel webpg title dept company mgr hmdir hmdrv profile loscr

Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com
http://www.jsifaq.com
 
C

Cary Shultz [A.D. MVP]

SW,

In addition to csvde you can use ldifde. You would just have to filter the
'search' for groups ( which you can do for specifically security groups as
well as specifically for distribution groups ) and then pick which
attributes/values are returned. ldifde, as csvde, is available
out-of-the-box in WIN2000. Please note that ldifde has a rather unforgiving
syntax and will give you a simple .ldf file. csvde might have an advantage
in that you can then use Excel to view that file.

Jerold also suggested a nice way....while these work on WIN2000 AD they are
actually WIN2003 AD utilities. I *think* that you have to have WIN2000 SP3
and above as well as a few other things ( .NET if I remember correctly ).
You should be able to use them, though, just fine on WIN2000. Not 100% sure
about that, though.

--
Cary W. Shultz
Roanoke, VA 24012

WIN2000 Active Directory MVP
http://www.activedirectory-win2000.com
(soon to be updated!!!)
http://www.grouppolicy-win2000.com
(soon to be updated!!!)
 
G

Guest

That worked a treat , thanks

Jerold Schulman said:
See tip 6820 » What are the new Active Directory command-line tools in Windows Server 2003?
in the 'Tips & Tricks' at http://www.jsifaq.com

Well it's not a csv format, but using the Active Directory command-line tools which you can run from a Windows XP domain member, type on 1 line:

dsget group "CN=Accounts Payables,CN=Users,DC=JSIINC,DC=COM" -members|dsget user -dn -samid -sid -upn -fn -mi -ln -display -empid -desc -office -tel -email -hometel -pager -mobile -fax -iptel -webpg -title -dept -company -mgr -hmdir -hmdrv
-profile -loscr

Here is the headings of the output list:

dn desc samid sid upn fn mi ln display empid office tel email
hometel pager mobile fax iptel webpg title dept company mgr hmdir hmdrv profile loscr

Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com
http://www.jsifaq.com
 

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