Export (0) Print
Expand All

Create an email address policy by using recipient filters

 

Applies to: Exchange Server 2013

Topic Last Modified: 2012-10-16

You can use the Shell to create an email address policy by using recipient filters. To learn more about email address policies, see Email address policies.

For additional management tasks related to email address policies, see Email address policy procedures.

  • Estimated time to complete: 5 minutes.

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

    ImportantImportant:
    If you use a recipient filter to create or edit an email address policy, you can't use the Exchange Administration Center (EAC) to edit the email address policy. You must use the Shell. For detailed syntax and parameter information, see Set-EmailAddressPolicy.
  • You need to be assigned permissions before you can perform this procedure or procedures. To see what permissions you need, see the "Email address policies" entry in the Email addresses and address books topic.

  • Before an SMTP address domain can be used in an email address policy, you must configure an accepted domain. For more, see Accepted domains.

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

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

To create an email address policy by using recipient filters, use the following syntax.

New-EmailAddressPolicy -Name <String> -RecipientFilter <String>

This example creates an email address policy that applies to all executives and for which the local part of the email address consists of the first two letters of their first name and their entire last name.

New-EmailAddressPolicy -Name 'Execs' -EnabledEmailAddressTemplates 'SMTP:%2g%s@contoso.com' -RecipientFilter {((RecipientType -eq 'UserMailbox') -and (Title -like 'executive'))}

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

 
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft