Applies to: Exchange Server 2013, Exchange Online

Topic Last Modified: 2012-10-14

This topic explains how to create an address list by using recipient filters. To learn more about address lists, see Address Lists.

For additional management tasks related to address lists, see Address List Procedures.

What do you need to know before you begin?

  • Estimated time to complete each procedure: 5 minutes.

  • You need to be assigned permissions before you can perform this procedure or procedures. To see what permissions you need, see the "Address lists" entry in the Email Address and Address Book Permissions topic.

  • To use the RecipientFilter parameter to create a custom filter, you must specify a string for the filter. The Shell uses OPATH for the filtering syntax. OPATH is a querying language designed to query object data sources.

  • You can’t use the Exchange Administration Center (EAC) to perform this procedure. You must use the Shell.

  • For information about keyboard shortcuts that may apply to the procedures in this topic, see Keyboard Shortcuts in the Exchange Admin Center.

Tip:
Having problems? Ask for help in the Exchange forums. Visit the forums at: Exchange Server, Exchange Online, or Exchange Online Protection

Use the Shell to create an address list by using recipient filters

This example creates an address list for all users with Exchange mailboxes who reside in Washington or Oregon.

Copy Code
New-AddressList -Name "Pacific Northwest Mailboxes" -RecipientFilter {((RecipientType -eq 'UserMailbox') -and ((StateOrProvince -eq 'Washington') -or (StateOrProvince -eq 'Oregon')))}

This example creates an address list for all users with Exchange mailboxes who have AgencyB as the value for the CustomAttribute15 parameter.

Copy Code
New-AddressList -Name "AgencyB" -RecipientFilter {(RecipientType -eq 'UserMailbox') -and (CustomAttribute15 -like *AgencyB*)}

For detailed syntax and parameter information, see New-AddressList.