Create an Address List By Using Recipient Filters

Applies to: Exchange Server 2010

Topic Last Modified: 2011-03-19

This topic explains how to use the Exchange Management Shell to create an address list by using recipient filters. To learn more about recipient filters, see Managing Address Lists.

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. For more information about the OPATH filtering syntax, see Creating Filters in Recipient Commands.

Looking for other management tasks related to address lists? Check out Managing Address Lists.

You need to be assigned permissions before you can perform this procedure. To see what permissions you need, see the "Recipient Provisioning Permissions" section in the Mailbox Permissions topic.

You can't use the EMC to create an address list by using recipient filters.

To create an address list by using the RecipientFilter parameter, use the following syntax.

New-AddressList -Name <String> -RecipientFilter <String>

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')))}

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