{"id":1128,"date":"2021-04-15T15:34:56","date_gmt":"2021-04-15T13:34:56","guid":{"rendered":"http:\/\/dety.net.ua\/?p=1128"},"modified":"2021-04-15T17:02:54","modified_gmt":"2021-04-15T15:02:54","slug":"exchange-2019-dynamic-dls","status":"publish","type":"post","link":"https:\/\/dety.net.ua\/?p=1128","title":{"rendered":"Exchange 2019 Dynamic DLs"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">It&#8217;s a pity but Ex2019 doesn&#8217;t have full UI for dynamic DLs. You can&#8217;t create custom rules as it was before. You have to do it via PowerShell.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Get-DynamicDistributionGroup -Identity managers | fl<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Set-DynamicDistributionGroup -Identity managers -RecipientContainer &#8220;local.com\/Container&#8221; -RecipientFilter &#8220;((((((Title -like &#8216;<em>Lead<\/em>&#8216;) -or (Title -like &#8216;<em>Manager<\/em>&#8216;))) -and (RecipientType -eq &#8216;UserMailbox&#8217;))) -and -not(UserAccountControl -eq &#8216;AccountDisabled, NormalAccount&#8217;) -and (Department -eq -&#8216;Dep&#8217;) -and (-not(Name -like &#8216;SystemMailbox{<em>&#8216;)) -and (-not(Name -like &#8216;CAS_{<\/em>&#8216;)) -and (-not(RecipientTypeDetailsValue -eq &#8216;MailboxPlan&#8217;)) -and (-not(RecipientTypeDetailsValue -eq &#8216;DiscoveryMailbox&#8217;)) -and (-not(RecipientTypeDetailsValue -eq &#8216;PublicFolderMailbox&#8217;)) -and (-not(RecipientTypeDetailsValue -eq &#8216;ArbitrationMailbox&#8217;)) -and (-not(RecipientTypeDetailsValue -eq &#8216;AuditLogMailbox&#8217;)) -and (-not(RecipientTypeDetailsValue -eq &#8216;AuxAuditLogMailbox&#8217;)) -and (-not(RecipientTypeDetailsValue -eq &#8216;SupervisoryReviewPolicyMailbox&#8217;)))&#8221;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check the membership:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Get-Recipient -RecipientPreviewFilter (get-dynamicdistributiongroup managers).RecipientFilter -OrganizationalUnit $group.RecipientContainer<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Another example:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Set-DynamicDistributionGroup -Identity managers -RecipientContainer &#8220;local.com\/Container&#8221; -RecipientFilter &#8220;((((Title -like &#8216;<em>Manager<\/em>&#8216; -and Title -ne &#8216;Office Manager&#8217; -and Title -ne &#8216;PR Manager&#8217; -and Title -ne &#8216;HR Manager&#8217; -or Title -like &#8216;<em>Product Owner<\/em>&#8216;) -and (RecipientType -eq &#8216;UserMailbox&#8217;))) -and -not(UserAccountControl -eq &#8216;AccountDisabled, NormalAccount&#8217;) -and (Department -eq -&#8216;Dep&#8217;) -and (-not(Name -like &#8216;SystemMailbox{<em>&#8216;)) -and (-not(Name -like &#8216;CAS_{<\/em>&#8216;)) -and (-not(RecipientTypeDetailsValue -eq &#8216;MailboxPlan&#8217;)) -and (-not(RecipientTypeDetailsValue -eq &#8216;DiscoveryMailbox&#8217;)) -and (-not(RecipientTypeDetailsValue -eq &#8216;PublicFolderMailbox&#8217;)) -and (-not(RecipientTypeDetailsValue -eq &#8216;ArbitrationMailbox&#8217;)) -and (-not(RecipientTypeDetailsValue -eq &#8216;AuditLogMailbox&#8217;)) -and (-not(RecipientTypeDetailsValue -eq &#8216;AuxAuditLogMailbox&#8217;)) -and (-not(RecipientTypeDetailsValue -eq &#8216;SupervisoryReviewPolicyMailbox&#8217;)))&#8221;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It&#8217;s a pity but Ex2019 doesn&#8217;t have full UI for dynamic DLs. You can&#8217;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 &#8220;local.com\/Container&#8221; -RecipientFilter &#8220;((((((Title -like &#8216;Lead&#8216;) -or (Title -like &#8216;Manager&#8216;))) -and (RecipientType -eq &#8216;UserMailbox&#8217;))) -and -not(UserAccountControl -eq &#8216;AccountDisabled, NormalAccount&#8217;) [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1128","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/dety.net.ua\/index.php?rest_route=\/wp\/v2\/posts\/1128","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dety.net.ua\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dety.net.ua\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dety.net.ua\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dety.net.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1128"}],"version-history":[{"count":2,"href":"https:\/\/dety.net.ua\/index.php?rest_route=\/wp\/v2\/posts\/1128\/revisions"}],"predecessor-version":[{"id":1130,"href":"https:\/\/dety.net.ua\/index.php?rest_route=\/wp\/v2\/posts\/1128\/revisions\/1130"}],"wp:attachment":[{"href":"https:\/\/dety.net.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1128"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dety.net.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1128"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dety.net.ua\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1128"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}