Solved

Using a Wildcard to build an Exchange 2007 address list

Posted on 2009-04-10
2
1,361 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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lotus Notes – formerly IBM Notes – is an email client application, while IBM Domino (earlier Lotus Domino) is an email server. The client possesses a set of features that are even more advanced as compared to that of Outlook. Likewise, IBM Domino is…
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.
To show how to create a transport rule 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 >> Rules tab.:  To cr…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

770 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