I am looking for a way to export an Exchange 2007 Distribution List to SMTP addresses. Ideally a VB or PowerShell script that lets me specify the list I am interested in and returns the list of members' smtp addresses is what I am looking for.
Thanks for any help you can offer!
If the primary SMTP address is enough:
If it isn't:
(The last one will also include non-SMTP addresses, so it may require some post-processing.)
Edit:
The best course of action would be to use the Exchange Management Shell, which is built for that; but if you can't use it, standard PowerShell can still help you: