Solved

Using a Wildcard to build an Exchange 2007 address list

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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

Suggested Solutions

Find out what you should include to make the best professional email signature for your organization.
A list of top three free exchange EDB viewers that helps the user to extract a mailbox from an unmounted .edb file and get a clear preview of all emails & other items with just a single click on mailboxes.
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 …
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…

696 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