Is there a way to extract email addresses from a distribution list via command line in Outlook?

4

1

I have been able to get the members of the distro list via the command below but I am unable to figure out how to get the email addresses. Any ideas?

dsquery group -name "Distribution-list" | dsget group -members -expand

commandline

Posted 2010-11-04T03:12:10.150

Reputation: 41

Answers

1

This will get you the email addresses and also expand the distribution group for subgroups.

dsquery group -name "group name"|dsget group -members -expand|dsquery user |dsget user -dn -samid -email

Reference

Justin Dearing

Posted 2010-11-04T03:12:10.150

Reputation: 2 704