Create an address list by using recipient filters


Applies to: Exchange Online, Exchange Server 2013

Topic Last Modified: 2014-12-16

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.

  • 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.

  • By default in Exchange Online, the Address List role isn’t assigned to any role groups. To use any cmdlets that require the Address List role, you need to add the role to a role group. For more information, see the "Add a role to a role group" section in the topic, Manage role groups.

  • 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.

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

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

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.

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

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