Powershell: Dynamic Distribution Group filtered by Office attribute

此生再无相见时 提交于 2019-12-12 00:16:13

问题


I've made several DDG's, but I'm having a bugger of a time using a recipient filter for the Office attribute. We are running Exchange 2007 SP3. I've tried lots of variations on the filter, trying to make it even simpler, but to no avail. I can use attributes like postalcode or title and works as designed.

New-DynamicDistributionGroup -Name DDG-TEST `
    -Alias DDG-TEST `
    -RecipientFilter { RecipientType -eq 'UserMailbox' -and Office -eq 'Chicago' } `
    -DisplayName DDG-TEST `
    -OrganizationalUnit  "OU=TEST,DC=domain,DC=local`
    -RecipientContainer "domain.local/District" `
    -DomainController "dc.domain.local"

The DDG creates fine, but there are no members. I've queried for those same users like below, and I get 79 users.

Get-ADObject -Filter ("physicalDeliveryOfficeName -eq 'Chicago'")

Anyone have similar issues? I swear I've scoured the inter-tubes and I've looked at other peoples code and I don't see anything that's amiss. Thanks for your help!


回答1:


Try changing the syntax for Recipient Container - in this case, set it to OU=District, DC=domain, DC=local. I just created a Dynamic List the same way, with no issue.



来源:https://stackoverflow.com/questions/20553674/powershell-dynamic-distribution-group-filtered-by-office-attribute

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!