问题
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