Link to home
Start Free TrialLog in
Avatar of Ascentium
Ascentium

asked on

Dynamic DL Custom Filter by OU

Hi All,
I'm trying to create a Dynamic DL with a custom filter that sends to users from seven different OUs.  Basically it is just an All Employee DL, but I have my users separated by location.  I would go higher in the OU tree structure but then I end up with the contractor and test accounts included.  Here is what I have so far... my problem is that I don't know the syntax to include all the OUs.

New-DynamicDistributionGroup -Name 'All Employees' -OrganizationalUnit 'domain/Users' -RecipientFilter {RecipientType -eq 'UserMailbox'} -RecipientContainer 'domain/Corp/Location/WA2/Users'

Here are the OUs I need to include...
'domain/Corp/Location/WA2/Users'
'domain/Corp/Location/WA3/Users'
'domain/Corp/Location/WA4/Users'
'domain/Corp/Location/CA1/Users'
'domain/Corp/Location/OR1/Users'
'domain/Corp/Location/MD1/Users'
'domain/Corp/Location/UK1/Users'
ASKER CERTIFIED SOLUTION
Avatar of athelu
athelu
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
What I tend to do is use the extensionAttributes that are available (list as custom attributes) and use these do identify the various companies or units, and then filter on these.
Create DDG in all OUs (by default the scop of recipient is the location OU where DDG is created) and create a main DL of all these DDG ;)
Avatar of Ascentium
Ascentium

ASKER

Is adding DDGs to a "main" DL supported?  There is not a Member Of option in the console.  Seems like they would have added that.  I can add the DDG as a member of another group.  Just want to make sure I'm not missing something.  
Yes, you can have a DL with a DDG as a member.
Shouldn't I be able to specify which users the DDL can choose from by -RecipientContainer?  Can you specify more than one container?
The Recipient container is part of the scope of the filter. Only one may be used.