Dynamic Distribution Group Exchange 2016 based on OU

mrtro-1199 236 Reputation points
2022-03-28T11:03:31.753+00:00

Dear experts
I am trying to create a a dynamic distribution group in our on-prem Exchange 2016. I want all users in a perticular OU but what I get is users in that OU and other OU:s aswell. It does seem to ignore the RecipientContainer option. See below for PS output:

Get-DynamicDistributionGroup -Identity justemployees | fl

RunspaceId : a0067603-55f1-673c-2341-18cfabdddddc
RecipientContainer : our.domain/OurOrg/Users/JustEmployees
RecipientFilter : ((RecipientType -eq 'UserMailbox') -and (-not(Name -like 'SystemMailbox{')) -
and (-not(Name -like 'CAS_{
')) -and (-not(RecipientTypeDetailsValue -eq 'Mail
boxPlan')) -and (-not(RecipientTypeDetailsValue -eq 'DiscoveryMailbox')) -and
(-not(RecipientTypeDetailsValue -eq 'PublicFolderMailbox')) -and (-not(Recipie
ntTypeDetailsValue -eq 'ArbitrationMailbox')) -and (-not(RecipientTypeDetailsV
alue -eq 'AuditLogMailbox')) -and (-not(RecipientTypeDetailsValue -eq 'AuxAudi
tLogMailbox')) -and (-not(RecipientTypeDetailsValue -eq 'SupervisoryReviewPoli
cyMailbox')))
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))(!(msExchRecipientTypeDetails=70368744177664))(!(msE
xchRecipientTypeDetails=140737488355328)))
IncludedRecipients : MailboxUsers

I created it in the GUI where I specified the OU in the membership section which was pretty straight forward but as said, it is not limiting to that OU.

What am I doing wrong?

Thanks for any help and comments.
Mrtro

Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,632 questions
0 comments No comments
{count} votes

Accepted answer
  1. Andy David - MVP 147.9K Reputation points MVP
    2022-03-28T12:22:23.97+00:00

    Yes, Check to see what s returned for:

    https://learn.microsoft.com/en-us/exchange/recipients/dynamic-distribution-groups/view-dynamic-distribution-group-members?view=exchserver-2019

    $<VariableName> = Get-DynamicDistributionGroup -Identity <DynamicDistributionGroupIdentity>  
    
    Get-Recipient -RecipientPreviewFilter ($<VariableName>.RecipientFilter) [-OrganizationalUnit ($<VariableName>.RecipientContainer)]  
    
    
    $FTE = Get-DynamicDistributionGroup -Identity "Full Time Employees"  
    
    Get-Recipient -RecipientPreviewFilter ($FTE.RecipientFilter)
    

1 additional answer

Sort by: Most helpful
  1. mrtro-1199 236 Reputation points
    2022-03-28T12:08:22.89+00:00

    Found this https://msexchangeguru.com/2017/11/17/ddg-issue/
    So does that mean that it is indeed working, it is just a matter i displaying the result in Powershell?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.