Solved

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

Posted on 2013-06-24
4
2,476 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

Do email signature updates give you a headache?

Do you feel like all of your time is spent managing email signatures? Too busy to visit every user’s desk to make updates? Want high-quality HTML signatures on all devices, including on mobiles and Macs? Then, let Exclaimer solve all your email signature problems today!

Join & Write a Comment

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
This article explains in simple steps how to renew expiring Exchange Server Internal Transport Certificate.
In this video we show how to create a Resource Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: Navigate to the Recipients >> Resources tab.: "Recipients" is our default selection …
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…

760 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

22 Experts available now in Live!

Get 1:1 Help Now