Exchange 2010 Dynamic Distribution List syntax for Not Equal To

Posted on 2012-08-15
Last Modified: 2012-09-05
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?

Question by:CyberGar
    LVL 31

    Assisted Solution

    I'm not sure how you would use -ne with the ConditionalCustomAttribute1 parameter, but you might try

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

    LVL 38

    Expert Comment

    by:Adam Brown
    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.
    LVL 3

    Accepted Solution

    In this situation, -Contains or -Notcontains may work better:

    CustomAttribute1 -contains 'keyword'
    CustomAttribute1 -NotContains 'keyword'
    LVL 1

    Author Closing Comment

    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.

    Featured Post

    Want to promote your upcoming event?

    Is your company attending an event or exhibiting at a trade show soon? Are you speaking at a conference? Spread the word by using a promotional banner in your email signature. This will ensure your organization’s most important contacts are in the know.

    Join & Write a Comment

    Set OWA language and time zone in Exchange for individuals, all users or per database.
    Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    This video discusses moving either the default database or any database to a new volume.

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now