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
scotth4711Asked:
Who is Participating?
 
scotth4711Connect With a Mentor Author Commented:
Recipients filter:
((CustomAttribute1 -eq 'HSMS') -and (((CustomAttribute2 -eq 'Faculty') -or (CustomAttribute3 -eq 'Staff'))) -and (Alias -ne $null))
0
 
Gareth GudgerCommented:
Have you already set these custom attributes on these mailboxes?

For example, Set-Mailbox -CustomAttribute3 "Staff"
0
 
scotth4711Author Commented:
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.
0
Easily manage email signatures in Office 365

Managing email signatures in Office 365 can be a challenging task if you don't have the right tool. CodeTwo Email Signatures for Office 365 will help you implement a unified email signature look, no matter what email client is used by users. Test it for free!

 
scotth4711Author Commented:
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.
0
 
scotth4711Author Commented:
Kept Playing around till I got it.
0
 
AdvizorCommented:
Hi Guys

Whats the syntax if i need to input variables?
0
All Courses

From novice to tech pro — start learning today.