How to Create an Address List By Using Recipient Filters

Microsoft Exchange Server 2007 will reach end of support on April 11, 2017. To stay supported, you will need to upgrade. For more information, see Resources to help you upgrade your Office 2007 servers and clients.


Applies to: Exchange Server 2007, Exchange Server 2007 SP1, Exchange Server 2007 SP2, Exchange Server 2007 SP3

Topic Last Modified: 2007-01-02

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.

You cannot use the Exchange Management Console to create an address list using the recipient filters. You must use the Exchange Management Shell.

To perform the following procedure, the account you use must be delegated the following:

  • Exchange Organization Administrator role

For more information about permissions, delegating roles, and the rights that are required to administer Microsoft Exchange Server 2007, see Permission Considerations.

Also, before you perform this procedure, be aware that to use the RecipientFilter parameter to create a custom filter, you must specify a string for the filter. The Exchange Management 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.

  • To create an address list by using the RecipientFilter parameter, run the following command.

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

    For example, to create a new address list for all users with Exchange mailboxes who reside in Washington or Oregon, run the following command.

    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 the New-AddressList reference topic.

For more information about address lists, see the following topics:

For more information about pipelining output in the Exchange Management Shell, see Pipelining.