How do I exclude an OU from an Exchange 2010 dynamic distribution group?

intlfcs_krismortensen used Ask the Experts™
I have an Exchange 2010 dynamic distribution group that needs to have a particular OU excluded from its criteria.  How can I do this?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
You have to append a custom attribute to users in this OU. For example Get-Mailbox -OrganizationalUnit "OU=Test,DC=Contoso,DC=com" | Set-Mailbox -CustomAttribute1 "test"

Then you create the DDL filter to exclude custom attribute -notlike (-ne) test
Based on your answer, it looks like this should be done in Exchange Management Shell?  The reason I say that is that when I get the properties of the existing dynamic group, the conditions tab only allows me to select "Custom Attribute 1 equals Value" (as opposed to 'does not equal value).  If this is a shell based solution, what is the syntax that I would use to modify the existing group in such a way?

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial