Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Using a Wildcard to build an Exchange 2007 address list

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Learn to move / copy / export exchange contacts to iPhone without using any software. Also see the issues in configuration of exchange with iPhone to migrate contacts.
Find out what you should include to make the best professional email signature for your organization.
In this video we show how to create a Contact 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 Recipients >> Contact ta…
In this video we show how to create a mailbox database 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 >> Data…

808 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