locked
All staff dynamic DL , how to exclude other OU's ? RRS feed

  • Question

  • Dear Experts ,

    We are  using a Dynamic DL for sending mail to All Staff.This DL is applied to all mailboxes of abc.local with below filter .

    ((((((((((((((RecipientType -eq 'UserMailbox') -and (-not(Name -like 'WFPROD')))) -and (-not(Name -like 'SystemMailbox{*')))) -and (-not(Name -like 'CAS_{*')))) -and (-not(RecipientTypeDetailsValue -eq 'MailboxPlan')))) -and (-not(RecipientTypeDetailsValue -eq 'DiscoveryMailbox')))) -and (-not(RecipientTypeDetailsValue -eq 'ArbitrationMailbox')))) -and (-not(Name -like 'SystemMailbox{*')) -and (-not(Name -like 'CAS_{*')) -and (-not(RecipientTypeDetailsValue -eq 'MailboxPlan')) -and (-not(RecipientTypeDetailsValue -eq 'DiscoveryMailbox')) -and (-not(RecipientTypeDetailsValue -eq 'ArbitrationMailbox')))

    we neeed to exclude all other ou's expect 3 OU's thet hold staff , management and Sr. Mgmt ou's .Please let me know how can I achive this.

    Thanks in advance

    Regards

    CK

    Sunday, June 24, 2012 6:53 PM

Answers

  • I believe you will have to use some other attribute.  Perhaps you can put the OU into one of the extension attributes and then sort on that.

    Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."

    • Marked as answer by emma.yoyo Friday, June 29, 2012 2:18 AM
    Monday, June 25, 2012 6:16 PM
  • Agree with Ed, OU isn't a property of a user.

    You can append a custom attribute to users in this OU, for example:

    Get-Mailbox -OrganizationalUnit "abc.local/OU1" | Set-Mailbox -CustomAttribute1 "test"


    Frank Wang

    TechNet Community Support

    • Marked as answer by emma.yoyo Friday, June 29, 2012 2:18 AM
    Tuesday, June 26, 2012 6:17 AM

All replies

  • I don't believe that is supported.  It was a hard thing to do in LDAP as well.


    Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."

    Monday, June 25, 2012 3:35 AM
  • That means once we created a Dynamic DL that applied to abc.local . There is no option to limit this to ou1/abc.local , ou2/abc.local;  by excluding  ou3/abc.local etc.

    Can please flash somemore light in to this . This is an usrgent request because all mailboxes in conractors ou is getting mail while sending to all@abc.com. Please let me if there is any other work around in this issue .

    Thanks in adavance...

    Monday, June 25, 2012 5:56 AM
  • I believe you will have to use some other attribute.  Perhaps you can put the OU into one of the extension attributes and then sort on that.

    Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."

    • Marked as answer by emma.yoyo Friday, June 29, 2012 2:18 AM
    Monday, June 25, 2012 6:16 PM
  • Agree with Ed, OU isn't a property of a user.

    You can append a custom attribute to users in this OU, for example:

    Get-Mailbox -OrganizationalUnit "abc.local/OU1" | Set-Mailbox -CustomAttribute1 "test"


    Frank Wang

    TechNet Community Support

    • Marked as answer by emma.yoyo Friday, June 29, 2012 2:18 AM
    Tuesday, June 26, 2012 6:17 AM
  • Hi CK,

    Any updates?


    Frank Wang

    TechNet Community Support

    Thursday, June 28, 2012 2:33 AM