Solved

Exchange PowerShell:  Get all Primary SMTP Addresses of members of Distribution List

Posted on 2013-06-24
4
2,535 Views
Last Modified: 2013-06-24
We need all primary SMTP addresses from all members of a particular Distribution List.  We have all kind of members in this DL like Mailboxes, Public Folders, Distribution Lists etc.

How can we get only the primary SMTP addresses of this DL?
0
Comment
Question by:whenz
  • 2
4 Comments
 
LVL 19

Expert Comment

by:Patricksr1972
ID: 39270526
Hi,.

Try this one.

Get-Mailbox -ResultSize Unlimited |Select-Object DisplayName,ServerName,PrimarySmtpAddress, @{Name=“EmailAddresses”;Expression={$_.EmailAddresses |Where-Object {$_.PrefixString -ceq “smtp”} | ForEach-Object {$_.SmtpAddress}}}
0
 

Author Comment

by:whenz
ID: 39270550
Thanks Patricksr1972, but I need the mail addresses of members of a particular DL.  Please see the attached picture, in this DL we have Mailboxes, Public Folders, Contacts etc.
EE.jpg
0
 
LVL 19

Expert Comment

by:Patricksr1972
ID: 39270557
Hi,

Clear, you need to specify which DL.

What about this query i read on LINK:
$members = Get-DynamicDistributionGroup -Identity "dynamicgroupname"
Get-Recipient -RecipientPreviewFilter $members.RecipientFilter | select Displayname,PrimarySmtpAddress > membersall.txt
0
 
LVL 40

Accepted Solution

by:
Subsun earned 500 total points
ID: 39270744
Try..
Get-DistributionGroupMember "Group Name" | Select DisplayName,PrimarySmtpAddress

Open in new window

Replace Select DisplayName,PrimarySmtpAddress with Select PrimarySmtpAddress to get only SmtpAddress
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
Find out what you should include to make the best professional email signature for your organization.
In this video we show how to create a Distribution Group in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >>…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now