Solved

Using a Wildcard to build an Exchange 2007 address list

Posted on 2009-04-10
2
1,351 Views
Last Modified: 2012-06-22
I am trying to upgrade our LDAP based address lists to OPATH.  I would like to use this syntax to build a new (or upgrade, which ever you prefer) dynamic address list but it is not working...  It just does not build the list.  

Set-AddressList 'Microsoft' -RecipientFilter { (RecipientType -eq 'MailContact' -and EmailAddresses -eq '*@Microsoft.com') }

However, when I use either one of the following it works; assuming the mail contact has "Microsoft" in the description field or I specify an exact email address and remove the Wildcard.

Set-AddressList 'Microsoft' -RecipientFilter { (RecipientType -eq 'MailContact' -and Description -eq 'Microsoft') }

This would be fine if I did not have to go through hundreds and hundreds of contacts and update their description...

or

Set-AddressList 'Microsoft' -RecipientFilter { (RecipientType -eq 'MailContact' -and EmailAddresses -eq 'UserEmail@Microsoft.com') }

This one just builds the list with the one person's email address...

Any help is much appreciated.  Thank you in advance.

Simon

0
Comment
Question by:pamplinit
2 Comments
 
LVL 4

Accepted Solution

by:
MarcSpencer earned 500 total points
ID: 24121022
Set-AddressList 'Microsoft' -RecipientFilter { (RecipientType -eq 'MailContact' -and EmailAddresses -eq '*@Microsoft.com') }

You can't use -EQ and wildcards. You need to use -LIKE and the the wildcard.

Set-AddressList 'Microsoft' -RecipientFilter { (RecipientType -eq 'MailContact' -and EmailAddresses -like '*@Microsoft.com') }
0
 

Author Comment

by:pamplinit
ID: 24122783
I swear I tried using the "like" operator and it did not work...  

Oh well, It did this time.

MarcSpencer -  You are the man!  Thank you for your help.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Resolve DNS query failed errors for Exchange
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
To show how to generate a certificate request 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 Servers >> Certificates…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

705 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

18 Experts available now in Live!

Get 1:1 Help Now