Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
395 views
in Technique[技术] by (71.8m points)

exchange server - Powershell: Dynamic Distribution Group filtered by Office attribute

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!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...