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


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


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.