Exchange 2010 Dynamic Distribution List syntax for Not Equal To

I'm sure it is a simple syntax issue...

I want to create a dynamic distribution group to include all mailboxes EXCEPT those in wich I put a keyword in the Custom Attribute 1 field.

I tried Set-DynamicDistributionGroup <GROUPNAME> -ConditionalCustomAttribute1 { CustomAttribute1 -ne "keyword" }

but this resulted in a Condition of:

where Custom Attribute 1 equals ' CustomAttribute1 -ne "keyword" '

Can someone show me the syntac I would need to create this exception filter using Custom Attribute 1?

Who is Participating?
AkulshConnect With a Mentor Commented:
In this situation, -Contains or -Notcontains may work better:

CustomAttribute1 -contains 'keyword'
CustomAttribute1 -NotContains 'keyword'
LeeDerbyshireConnect With a Mentor Commented:
I'm not sure how you would use -ne with the ConditionalCustomAttribute1 parameter, but you might try

Set-DynamicDistributionGroup <GROUPNAME>
-RecipientFilter { CustomAttribute1 -ne 'keyword' }

Adam BrownSr Solutions ArchitectCommented:
the ConditionalCustomAttribute method is used only when you want a DDG to add users that have a custom attribute that is equal to something, not when it is not equal to it. You would have to use the -recipientfilter system instead, as Lee suggests.
CyberGarAuthor Commented:
Sorry for the long delay... been traveling for work a bit and honestly forgot this one until today...  I will close out the question with the hopes the RecipientFilter will work.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.