Avatar of YMartin
YMartin
 asked on

Exchange 2016 - need help listing members of Dynamic Distribution group

The results from the following command is not accurate.  It simply lists all mailboxes on the server.

$test = Get-DynamicDistributionGroup groupname
Get-Recipient -RecipientPreviewFilter $test.RecipientFilter | sort name

Open in new window



The properties of the group are:

RecipientContainer                     : (OU with limited users in it)
RecipientFilter                        : ((RecipientType -eq 'UserMailbox') -and (-not(Name -like 'SystemMailbox{*'))
                                         -and (-not(Name -like 'CAS_{*')) -and (-not(RecipientTypeDetailsValue -eq
                                         'MailboxPlan')) -and (-not(RecipientTypeDetailsValue -eq 'DiscoveryMailbox'))
                                         -and (-not(RecipientTypeDetailsValue -eq 'PublicFolderMailbox')) -and
                                         (-not(RecipientTypeDetailsValue -eq 'ArbitrationMailbox')) -and
                                         (-not(RecipientTypeDetailsValue -eq 'AuditLogMailbox')))
LdapRecipientFilter                    : (&(!(!(objectClass=user)))(objectCategory=person)(mailNickname=*)(msExchHomeSe
                                         rverName=*)(!(name=SystemMailbox{*))(!(name=CAS_{*))(!(msExchRecipientTypeDeta
                                         ils=16777216))(!(msExchRecipientTypeDetails=536870912))(!(msExchRecipientTypeD
                                         etails=68719476736))(!(msExchRecipientTypeDetails=8388608))(!(msExchRecipientT
                                         ypeDetails=4398046511104)))

Open in new window


So far I have deleted the Distribution group and created it in ECP with no change (Exchange 2016 now supports creating these within ECP so decided to try that).

At least one user in the correct OU reports not having received a recent email.  The multi-mailbox search shows he received it but wanted to check the group membership and find that I cannot.

I am looking for help getting the correct list of users for the group.

Thank you.
ExchangeEmail Servers

Avatar of undefined
Last Comment
YMartin

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Jian An Lim

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
YMartin

ASKER
That was it.  Obvious now.  Pasted the original command direct from TechNet.
Your help has saved me hundreds of hours of internet surfing.
fblack61