Exporting Distribution List from Echange 2007 into CSV or text file

quickslvr
quickslvr used Ask the Experts™
on
anyone an idea how to do it? is there a difference if i do if from outlook or domi have to do it on exchange?

if yes,hows the command?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
Assuming the lists are kept as distribution groups in active directory you can use
the ds* utilities to extract.  Here's an example to get all the addresses of a list
where the list may contain combination of users and nested groups:

C:\> dsquery group -name "listname" | dsget group -members -expand
 | find /v "OU=Groups" | dsget user -email
  email
  joe.smith@abc.com
  john.washington@abc.com
  gina.bradford@abc.com
  joshi.ramkrishna@abc.com
dsget succeeded

C:\>

Omitting OU=Groups is necessary because dsget includes the
name of the nested group before expanding its members.
Wrap this with some other scripting to process a list of lists and
join results into csv.
You can also try these

csvde -f report.txt -r "memberOf=cn=MyList,ou=Sales,dc=MyDomain,dc=co m" –l sAMAccountName,displayName,mail

ldifde -f report.txt -r "memberOf=cn=MyList,ou=Sales,dc=MyDomain,dc=co m" –l sAMAccountName,displayName,mail
i found a better solution

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial