Solved

Create Global Address List using a Recipient Filter with two or more custom Attributes

Posted on 2014-02-06
6
1,236 Views
Last Modified: 2016-08-26
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
0
Comment
Question by:scotth4711
  • 4
6 Comments
 
LVL 30

Expert Comment

by:Gareth Gudger
Comment Utility
Have you already set these custom attributes on these mailboxes?

For example, Set-Mailbox -CustomAttribute3 "Staff"
0
 

Author Comment

by:scotth4711
Comment Utility
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
 

Author Comment

by:scotth4711
Comment Utility
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
Why spend so long doing email signature updates?

Do you spend loads of your time carrying out email signature updates? Not very interesting are they? Don’t let signature updates get you down. Let Exclaimer Cloud - Signatures for Office 365 make managing email signatures a breeze.

 

Accepted Solution

by:
scotth4711 earned 0 total points
Comment Utility
Recipients filter:
((CustomAttribute1 -eq 'HSMS') -and (((CustomAttribute2 -eq 'Faculty') -or (CustomAttribute3 -eq 'Staff'))) -and (Alias -ne $null))
0
 

Author Closing Comment

by:scotth4711
Comment Utility
Kept Playing around till I got it.
0
 

Expert Comment

by:Advizor
Comment Utility
Hi Guys

Whats the syntax if i need to input variables?
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Marketers need statistics and metrics like everybody else needs oxygen. In this article we explain how to enable marketing campaign statistics for Microsoft Exchange mail.
Scam emails are a huge burden for many businesses. Spotting one is not always easy. Follow our tips to identify if an email you receive is a scam.
In this video we show how to create a Resource Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: Navigate to the Recipients >> Resources tab.: "Recipients" is our default selection …
In this video we show how to create an Accepted Domain in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Ac…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now