Link to home
Start Free TrialLog in
Avatar of quickslvr
quickslvrFlag for Switzerland

asked on

Exporting Distribution List from Echange 2007 into CSV or text file

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?
Avatar of steved64
steved64
Flag of United States of America image

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
ASKER CERTIFIED SOLUTION
Avatar of quickslvr
quickslvr
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial