Applies to: Exchange Server 2013
Topic Last Modified: 2012-07-12
Use the New-EmailAddressPolicy cmdlet to create an email address policy.
For information about the parameter sets in the Syntax section below, see Syntax.
Syntax
New-EmailAddressPolicy -EnabledEmailAddressTemplates
<ProxyAddressTemplateCollection> -RecipientFilter
<String> [-DisabledEmailAddressTemplates
<ProxyAddressTemplateCollection>] <COMMON
PARAMETERS>
|
New-EmailAddressPolicy -EnabledPrimarySMTPAddressTemplate
<String> -RecipientFilter <String> <COMMON
PARAMETERS>
|
New-EmailAddressPolicy -EnabledEmailAddressTemplates
<ProxyAddressTemplateCollection> -IncludedRecipients <None
| MailboxUsers | Resources | MailContacts | MailGroups | MailUsers
| AllRecipients> [-ConditionalCompany
<MultiValuedProperty>] [-ConditionalCustomAttribute1
<MultiValuedProperty>] [-ConditionalCustomAttribute10
<MultiValuedProperty>] [-ConditionalCustomAttribute11
<MultiValuedProperty>] [-ConditionalCustomAttribute12
<MultiValuedProperty>] [-ConditionalCustomAttribute13
<MultiValuedProperty>] [-ConditionalCustomAttribute14
<MultiValuedProperty>] [-ConditionalCustomAttribute15
<MultiValuedProperty>] [-ConditionalCustomAttribute2
<MultiValuedProperty>] [-ConditionalCustomAttribute3
<MultiValuedProperty>] [-ConditionalCustomAttribute4
<MultiValuedProperty>] [-ConditionalCustomAttribute5
<MultiValuedProperty>] [-ConditionalCustomAttribute6
<MultiValuedProperty>] [-ConditionalCustomAttribute7
<MultiValuedProperty>] [-ConditionalCustomAttribute8
<MultiValuedProperty>] [-ConditionalCustomAttribute9
<MultiValuedProperty>] [-ConditionalDepartment
<MultiValuedProperty>] [-ConditionalStateOrProvince
<MultiValuedProperty>] [-DisabledEmailAddressTemplates
<ProxyAddressTemplateCollection>] <COMMON
PARAMETERS>
|
New-EmailAddressPolicy -EnabledPrimarySMTPAddressTemplate
<String> -IncludedRecipients <None | MailboxUsers |
Resources | MailContacts | MailGroups | MailUsers |
AllRecipients> [-ConditionalCompany <MultiValuedProperty>]
[-ConditionalCustomAttribute1 <MultiValuedProperty>]
[-ConditionalCustomAttribute10 <MultiValuedProperty>]
[-ConditionalCustomAttribute11 <MultiValuedProperty>]
[-ConditionalCustomAttribute12 <MultiValuedProperty>]
[-ConditionalCustomAttribute13 <MultiValuedProperty>]
[-ConditionalCustomAttribute14 <MultiValuedProperty>]
[-ConditionalCustomAttribute15 <MultiValuedProperty>]
[-ConditionalCustomAttribute2 <MultiValuedProperty>]
[-ConditionalCustomAttribute3 <MultiValuedProperty>]
[-ConditionalCustomAttribute4 <MultiValuedProperty>]
[-ConditionalCustomAttribute5 <MultiValuedProperty>]
[-ConditionalCustomAttribute6 <MultiValuedProperty>]
[-ConditionalCustomAttribute7 <MultiValuedProperty>]
[-ConditionalCustomAttribute8 <MultiValuedProperty>]
[-ConditionalCustomAttribute9 <MultiValuedProperty>]
[-ConditionalDepartment <MultiValuedProperty>]
[-ConditionalStateOrProvince <MultiValuedProperty>]
<COMMON PARAMETERS>
|
COMMON PARAMETERS: -Name <String> [-Confirm
[<SwitchParameter>]] [-DomainController <Fqdn>]
[-Organization <OrganizationIdParameter>] [-Priority
<EmailAddressPolicyPriority>] [-RecipientContainer
<OrganizationalUnitIdParameter>] [-WhatIf
[<SwitchParameter>]]
|
Examples
EXAMPLE 1
This example creates an email address policy that includes mailbox users in the southeast offices who have email addresses that include their last name combined with the first two letters of their first name.
Copy Code | |
---|---|
New-EmailAddressPolicy -Name "southeast offices" -IncludedRecipients UserMailbox -ConditionalStateOrProvince "Georgia","Alabama","Louisiana" -EnabledEmailAddressTemplates "SMTP:%s%2g@southeast.contoso.com" |
Detailed Description
You need to be assigned permissions before you can run this cmdlet. Although all parameters for this cmdlet are listed in this topic, you may not have access to some parameters if they're not included in the permissions assigned to you. To see what permissions you need, see the "Email address policies" entry in the Email Address and Address Book Permissions topic.
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
EnabledEmailAddressTemplates |
Required |
Microsoft.Exchange.Data.ProxyAddressTemplateCollection |
The EnabledEmailAddressTemplates parameter specifies the proxy addresses included in an email address policy and are enabled. Separate multiple values with commas. The domain part of each proxy address needs to match an existing accepted domain. |
EnabledPrimarySMTPAddressTemplate |
Required |
System.String |
The EnabledPrimarySMTPAddressTemplate parameter specifies the proxy address enabled and included in an email address policy. The domain part of each proxy address needs to match an existing accepted domain. |
IncludedRecipients |
Required |
Microsoft.Exchange.Data.Directory.Recipient.WellKnownRecipientType |
The IncludedRecipients parameter specifies how to filter recipients used to set the email address policy. The AllRecipients value can be used only by itself. When multiple values of the IncludedRecipients parameter are separated by commas, the OR Boolean operator is applied. |
Name |
Required |
System.String |
The Name parameter specifies the name of the email address policy. |
RecipientFilter |
Required |
System.String |
The RecipientFilter parameter specifies a filter for recipients to include in the email address policy. You can't use this parameter if you use any of the following filter parameters:
|
ConditionalCompany |
Optional |
Microsoft.Exchange.Data.MultiValuedProperty |
The ConditionalCompany parameter specifies a filter by company. It takes multiple values as a comma-delimited list. |
ConditionalCustomAttribute1 |
Optional |
Microsoft.Exchange.Data.MultiValuedProperty |
The ConditionalCustomAttribute1 to
ConditionalCustomAttribute15 parameters specify filters for
recipients' custom attributes. For example, if you set the
ConditionalCustomAttribute1 value to |
ConditionalCustomAttribute10 |
Optional |
Microsoft.Exchange.Data.MultiValuedProperty |
The ConditionalCustomAttribute1 to
ConditionalCustomAttribute15 parameters specify filters for
recipients' custom attributes. For example, if you set the
ConditionalCustomAttribute1 value to |
ConditionalCustomAttribute11 |
Optional |
Microsoft.Exchange.Data.MultiValuedProperty |
The ConditionalCustomAttribute1 to
ConditionalCustomAttribute15 parameters specify filters for
recipients' custom attributes. For example, if you set the
ConditionalCustomAttribute1 value to |
ConditionalCustomAttribute12 |
Optional |
Microsoft.Exchange.Data.MultiValuedProperty |
The ConditionalCustomAttribute1 to
ConditionalCustomAttribute15 parameters specify filters for
recipients' custom attributes. For example, if you set the
ConditionalCustomAttribute1 value to |
ConditionalCustomAttribute13 |
Optional |
Microsoft.Exchange.Data.MultiValuedProperty |
The ConditionalCustomAttribute1 to
ConditionalCustomAttribute15 parameters specify filters for
recipients' custom attributes. For example, if you set the
ConditionalCustomAttribute1 value to |
ConditionalCustomAttribute14 |
Optional |
Microsoft.Exchange.Data.MultiValuedProperty |
The ConditionalCustomAttribute1 to
ConditionalCustomAttribute15 parameters specify filters for
recipients' custom attributes. For example, if you set the
ConditionalCustomAttribute1 value to |
ConditionalCustomAttribute15 |
Optional |
Microsoft.Exchange.Data.MultiValuedProperty |
The ConditionalCustomAttribute1 to
ConditionalCustomAttribute15 parameters specify filters for
recipients' custom attributes. For example, if you set the
ConditionalCustomAttribute1 value to |
ConditionalCustomAttribute2 |
Optional |
Microsoft.Exchange.Data.MultiValuedProperty |
The ConditionalCustomAttribute1 to
ConditionalCustomAttribute15 parameters specify filters for
recipients' custom attributes. For example, if you set the
ConditionalCustomAttribute1 value to |
ConditionalCustomAttribute3 |
Optional |
Microsoft.Exchange.Data.MultiValuedProperty |
The ConditionalCustomAttribute1 to
ConditionalCustomAttribute15 parameters specify filters for
recipients' custom attributes. For example, if you set the
ConditionalCustomAttribute1 value to |
ConditionalCustomAttribute4 |
Optional |
Microsoft.Exchange.Data.MultiValuedProperty |
The ConditionalCustomAttribute1 to
ConditionalCustomAttribute15 parameters specify filters for
recipients' custom attributes. For example, if you set the
ConditionalCustomAttribute1 value to |
ConditionalCustomAttribute5 |
Optional |
Microsoft.Exchange.Data.MultiValuedProperty |
The ConditionalCustomAttribute1 to
ConditionalCustomAttribute15 parameters specify filters for
recipients' custom attributes. For example, if you set the
ConditionalCustomAttribute1 value to |
ConditionalCustomAttribute6 |
Optional |
Microsoft.Exchange.Data.MultiValuedProperty |
The ConditionalCustomAttribute1 to
ConditionalCustomAttribute15 parameters specify filters for
recipients' custom attributes. For example, if you set the
ConditionalCustomAttribute1 value to |
ConditionalCustomAttribute7 |
Optional |
Microsoft.Exchange.Data.MultiValuedProperty |
The ConditionalCustomAttribute1 to
ConditionalCustomAttribute15 parameters specify filters for
recipients' custom attributes. For example, if you set the
ConditionalCustomAttribute1 value to |
ConditionalCustomAttribute8 |
Optional |
Microsoft.Exchange.Data.MultiValuedProperty |
The ConditionalCustomAttribute1 to
ConditionalCustomAttribute15 parameters specify filters for
recipients' custom attributes. For example, if you set the
ConditionalCustomAttribute1 value to |
ConditionalCustomAttribute9 |
Optional |
Microsoft.Exchange.Data.MultiValuedProperty |
The ConditionalCustomAttribute1 to
ConditionalCustomAttribute15 parameters specify filters for
recipients' custom attributes. For example, if you set the
ConditionalCustomAttribute1 value to |
ConditionalDepartment |
Optional |
Microsoft.Exchange.Data.MultiValuedProperty |
The ConditionalDepartment parameter specifies a filter by department. It takes multiple values as a comma-delimited list. |
ConditionalStateOrProvince |
Optional |
Microsoft.Exchange.Data.MultiValuedProperty |
The ConditionalStateOrProvince parameter specifies a filter by state or province. It takes multiple values as a comma-delimited list. |
Confirm |
Optional |
System.Management.Automation.SwitchParameter |
The Confirm switch causes the command to pause processing and requires you to acknowledge what the command will do before processing continues. You don't have to specify a value with the Confirm switch. |
DisabledEmailAddressTemplates |
Optional |
Microsoft.Exchange.Data.ProxyAddressTemplateCollection |
The DisabledEmailAddressTemplates parameter specifies the proxy addresses included in an email address policy and are disabled. It takes multiple values as a comma-delimited list. |
DomainController |
Optional |
Microsoft.Exchange.Data.Fqdn |
The DomainController parameter specifies the fully qualified domain name (FQDN) of the domain controller that writes this configuration change to Active Directory. |
Organization |
Optional |
Microsoft.Exchange.Configuration.Tasks.OrganizationIdParameter |
The Organization parameter is reserved for internal Microsoft use. |
Priority |
Optional |
Microsoft.Exchange.Data.Directory.SystemConfiguration.EmailAddressPolicyPriority |
The Priority parameter specifies that the current priority is higher than the priority specified as an argument for this parameter. |
RecipientContainer |
Optional |
Microsoft.Exchange.Configuration.Tasks.OrganizationalUnitIdParameter |
The RecipientContainer parameter specifies how to filter the recipients used to build the email address policies based on their location in Active Directory Domain Services (AD DS). The value of the RecipientContainer parameter can be the canonical name of an organizational unit (OU) or a domain. If you don't specify a value for the RecipientContainer parameter, the default search filter is the location of the dynamic distribution group in AD DS. |
WhatIf |
Optional |
System.Management.Automation.SwitchParameter |
The WhatIf switch instructs the command to simulate the actions that it would take on the object. By using the WhatIf switch, you can view what changes would occur without having to apply any of those changes. You don't have to specify a value with the WhatIf switch. |
Input Types
To see the input types that this cmdlet accepts, see Cmdlet Input and Output Types. If the Input Type field for a cmdlet is blank, the cmdlet doesn’t accept input data.
Return Types
To see the return types, which are also known as output types, that this cmdlet accepts, see Cmdlet Input and Output Types. If the Output Type field is blank, the cmdlet doesn’t return data.