Address lists in Exchange 2010 with multiple CustomAttributes
Posted on 2011-09-19
Exchange 2010 SP1 RU5
I am trying to make dynamic address book lists according to Custom Attributes. I have some teachers that teach at different schools and they need to be put in address books which are set up for each school. I populated extensionAtrributes in AD with school locations which a teacher belongs to according to Human Resources. Then I made an address list with Custom Attributes set to multiple locations like this:
new-AddressList -Name 'test-fremont' -RecipientContainer 'sdw.ad/SCHOOLS' -IncludedRecipients 'AllRecipients' -ConditionalCustomAttribute2 '706' -ConditionalCustomAttribute3 '706' -Container '\Schools' -DisplayName 'test-school'
My AD extensionAttributes:
extensionAttribute 2 = 701 ==> Custom Attribute 2
extensionAttribute 3 = 706 ==> Custom Attribute 3
My problem is that I can't use (or don't know how to) multiple CustomAttributes as an 'OR' statement. In my statement above it command tries to meet all requirements. So if I have a teacher with multiple extensionAttributes in AD, I can't just pick one Custom Attribute. I was hoping to use an -OR statement in the new-AddressList command to populate those lists. Is there a way to use the -OR or is there a better way to create address lists and look at different Custom Attributes for location?