whenz
asked on
Exchange PowerShell: List SMTP E-Mail address from a Distribution List in a defined format
I need to extract following information from a Distribution List:
- Primary SMTP Address of ManagedBy object
- All SMTP addresses of all members of the distribution list
then I need to have the following format of the output
-------------------------- ---------- ---------- ---------- output.txt ---------- ---------- ---------- ---------- ---------- ------
SMTPAddress1Member1 PrimarySMTPAddressOfManage dByObject
SMTPAddress2Member1 PrimarySMTPAddressOfManage dByObject
SMTPAddress3Member1 PrimarySMTPAddressOfManage dByObject
SMTPAddress1Member2 PrimarySMTPAddressOfManage dByObject
SMTPAddress2Member2 PrimarySMTPAddressOfManage dByObject
-------------------------- ---------- ---------- ---------- output.txt ---------- ---------- ---------- ---------- ---------- ------
Example output.txt file:
I know this sounds very tricky, but maybe someone coded this one already :-)
Thanks for any help!
- Primary SMTP Address of ManagedBy object
- All SMTP addresses of all members of the distribution list
then I need to have the following format of the output
--------------------------
SMTPAddress1Member1 PrimarySMTPAddressOfManage
SMTPAddress2Member1 PrimarySMTPAddressOfManage
SMTPAddress3Member1 PrimarySMTPAddressOfManage
SMTPAddress1Member2 PrimarySMTPAddressOfManage
SMTPAddress2Member2 PrimarySMTPAddressOfManage
--------------------------
Example output.txt file:
Mark.Henderson@gmail.com JunkAdmin1@gmail.com
M.Henderson@gmail.com JunkAdmin1@gmail.com
Mark.H@gmail.com JunkAdmin1@gmail.com
Lisa.Simpson@gmail.com JunkAdmin1@gmail.com
L.Simpson@gmail.com JunkAdmin1@gmail.com
Lisa.S@gmail.com JunkAdmin1@gmail.com
Michael.Kight@gmail.com JunkAdmin1@gmail.com
M.Kight@gmail.com JunkAdmin1@gmail.com
Michael.K@gmail.com JunkAdmin1@gmail.com
I know this sounds very tricky, but maybe someone coded this one already :-)
Thanks for any help!
By PrimarySMTPAddressOfManage dByObject, do you mean the PrimarySMTPAddress of the group?
ASKER
No, I mean the primary SMTP Address of the ManagedBy Attribute. Please see the attached example, I would need the primary SMTP address of user "povici"
EE-screenshot.jpg
EE-screenshot.jpg
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Subsun you're a wizard, thank you indeed!!!