Some tips for me and other

Exchange 2019 Dynamic DLs

It’s a pity but Ex2019 doesn’t have full UI for dynamic DLs. You can’t create custom rules as it was before. You have to do it via PowerShell.

Get-DynamicDistributionGroup -Identity managers | fl

Set-DynamicDistributionGroup -Identity managers -RecipientContainer “” -RecipientFilter “((((((Title -like ‘Lead‘) -or (Title -like ‘Manager‘))) -and (RecipientType -eq ‘UserMailbox’))) -and -not(UserAccountControl -eq ‘AccountDisabled, NormalAccount’) -and (Department -eq -‘Dep’) -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’)) -and (-not(RecipientTypeDetailsValue -eq ‘AuxAuditLogMailbox’)) -and (-not(RecipientTypeDetailsValue -eq ‘SupervisoryReviewPolicyMailbox’)))”

Check the membership:

Get-Recipient -RecipientPreviewFilter (get-dynamicdistributiongroup managers).RecipientFilter -OrganizationalUnit $group.RecipientContainer

Another example:

Set-DynamicDistributionGroup -Identity managers -RecipientContainer “” -RecipientFilter “((((Title -like ‘Manager‘ -and Title -ne ‘Office Manager’ -and Title -ne ‘PR Manager’ -and Title -ne ‘HR Manager’ -or Title -like ‘Product Owner‘) -and (RecipientType -eq ‘UserMailbox’))) -and -not(UserAccountControl -eq ‘AccountDisabled, NormalAccount’) -and (Department -eq -‘Dep’) -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’)) -and (-not(RecipientTypeDetailsValue -eq ‘AuxAuditLogMailbox’)) -and (-not(RecipientTypeDetailsValue -eq ‘SupervisoryReviewPolicyMailbox’)))”

Comments are currently closed.