scotth4711
asked on
Create Global Address List using a Recipient Filter with two or more custom Attributes
I am trying to create a new Global Address List in Exchange 2010 using a recipient filter with two or more custom attributes.
New-GlobalAddressList -Name "GAL_HSMS" -RecipientFilter {((CustomAttribute1 -like "HSMS") -and (CustomAttribute2 -like "Faculty") -and (CustomAttribute3 -like "Staff"))}
Command executes without an error, however run I run the Update-GlobalAddressList -Identity "GAL_HSMS" it returns 0 users.
Any Help would be appreciative.
thanks,
Scott
New-GlobalAddressList -Name "GAL_HSMS" -RecipientFilter {((CustomAttribute1 -like "HSMS") -and (CustomAttribute2 -like "Faculty") -and (CustomAttribute3 -like "Staff"))}
Command executes without an error, however run I run the Update-GlobalAddressList -Identity "GAL_HSMS" it returns 0 users.
Any Help would be appreciative.
thanks,
Scott
ASKER
Yes, all the attributes have been assigned, and works fine if I use a single attribute, just doesn't work if I use multiple attributes.
ASKER
Ok, I know what I was doing wrong, I was writing three And Statements rather than 1 and and 1 or statement.
So I would need Attribute1 = hsms and or attribute2 = faculty or attribute3 = staff. not sure if this can be done, I may just need to use another attribute as fac_staff.
So I would need Attribute1 = hsms and or attribute2 = faculty or attribute3 = staff. not sure if this can be done, I may just need to use another attribute as fac_staff.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Kept Playing around till I got it.
Hi Guys
Whats the syntax if i need to input variables?
Whats the syntax if i need to input variables?
For example, Set-Mailbox -CustomAttribute3 "Staff"