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?

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

CustomAttribute1 -contains 'keyword'
OR
CustomAttribute1 -NotContains 'keyword'
0
 
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' }

instead.
0
 
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.
0
 
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.
0
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.