TechNet
Export (0) Print
Expand All

Set-EmailAddressPolicy

 

Applies to: Exchange Server 2016

This cmdlet is available only in on-premises Exchange Server 2016.

Use the Set-EmailAddressPolicy cmdlet to set Active Directory attributes for an email address policy.

For information about the parameter sets in the Syntax section below, see Syntax.

Set-EmailAddressPolicy -Identity <EmailAddressPolicyIdParameter> [-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>] [-Confirm [<SwitchParameter>]] [-DisabledEmailAddressTemplates <ProxyAddressTemplateCollection>] [-DomainController <Fqdn>] [-EnabledEmailAddressTemplates <ProxyAddressTemplateCollection>] [-EnabledPrimarySMTPAddressTemplate <String>] [-ForceUpgrade <SwitchParameter>] [-IncludedRecipients <None | MailboxUsers | Resources | MailContacts | MailGroups | MailUsers | AllRecipients>] [-Name <String>] [-Priority <EmailAddressPolicyPriority>] [-RecipientContainer <OrganizationalUnitIdParameter>] [-RecipientFilter <String>] [-WhatIf [<SwitchParameter>]]

This example changes the email address policy's name from EMAIL_ADDRESS_POLICY01 to EMAILADDRESSPOLICY02.

Set-EmailAddressPolicy -Identity EMAIL_ADDRESS_POLICY01 -Name EMAILADDRESSPOLICY02

This example edits the South East Offices email address policy that currently includes recipients in Georgia, Alabama, and Louisiana to also include recipients in Texas.

Set-EmailAddressPolicy -Identity "South East Offices" -ConditionalStateorProvince "Georgia","Alabama","Louisiana","Texas"
noteNote:
Although the email address policy is already applied to recipients in Georgia, Alabama, and Louisiana, you must include them in the parameter because the parameter overwrites values; it doesn't append new values to existing values.

The Set-EmailAddressPolicy cmdlet doesn't apply the changes to the email address policy. Use the Update-EmailAddressPolicy cmdlet following a Set-EmailAddressPolicy cmdlet for the changes to be applied.

For more information about the Update-EmailAddressPolicy cmdlet, see Update-EmailAddressPolicy.

The Conditional parameters that are used with the IncludedRecipients parameter are subject to the following limitations:

  • The EQV operator is used for every property value, as in "Department equals Sales". Wildcards and partial matches aren't supported.

  • The OR operator is always used for multiple values of the same property, as in "Department equals Sales OR Marketing".

  • The AND operator is always used for multiple properties, as in "Department equals Sales AND Company equals Contoso".

To create flexible filters that use any available recipient property and that aren't subject to these limitations, you can use the RecipientFilter parameter to create an OPath filter.

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.

 

Parameter Required Type Description

Identity

Required

Microsoft.Exchange.Configuration.Tasks.EmailAddressPolicyIdParameter

The Identity parameter specifies the GUID, distinguished name (DN), or email address policy name that represents a specific email address policy. You can also include the path using the format Path\EmailAddressPolicy.

You can omit the parameter label so that only the email address policy name or GUID is supplied.

ConditionalCompany

Optional

Microsoft.Exchange.Data.MultiValuedProperty

The ConditionalCompany parameter specifies the company for the email address policy. It takes multiple values as a comma-delimited list. You must use the IncludedRecipients parameter if you use a Conditional parameter. You can't use this parameter if you use the RecipientFilter parameter.

ConditionalCustomAttribute1

Optional

Microsoft.Exchange.Data.MultiValuedProperty

This parameter specifies a filter that's based on the value of the recipient's CustomAttribute1 to CustomAttribute15 property. For example, if you set the ConditionalCustomAttribute1 parameter to the value Marketing, all recipients whose CustomAttribute1 value is Marketing are included in this filter. You can specify multiple values separated by commas.

When you use multiple values for this parameter, the OR Boolean operator is applied. For more information about how Conditional parameters work, see the Detailed Description section of this topic.

You can't use this parameter with the RecipientFilter parameter. You need to use the IncludedRecipients parameter with a Conditional parameter.

ConditionalCustomAttribute10

Optional

Microsoft.Exchange.Data.MultiValuedProperty

This parameter specifies a filter that's based on the value of the recipient's CustomAttribute1 to CustomAttribute15 property. For example, if you set the ConditionalCustomAttribute1 parameter to the value Marketing, all recipients whose CustomAttribute1 value is Marketing are included in this filter. You can specify multiple values separated by commas.

When you use multiple values for this parameter, the OR Boolean operator is applied. For more information about how Conditional parameters work, see the Detailed Description section of this topic.

You can't use this parameter with the RecipientFilter parameter. You need to use the IncludedRecipients parameter with a Conditional parameter.

ConditionalCustomAttribute11

Optional

Microsoft.Exchange.Data.MultiValuedProperty

This parameter specifies a filter that's based on the value of the recipient's CustomAttribute1 to CustomAttribute15 property. For example, if you set the ConditionalCustomAttribute1 parameter to the value Marketing, all recipients whose CustomAttribute1 value is Marketing are included in this filter. You can specify multiple values separated by commas.

When you use multiple values for this parameter, the OR Boolean operator is applied. For more information about how Conditional parameters work, see the Detailed Description section of this topic.

You can't use this parameter with the RecipientFilter parameter. You need to use the IncludedRecipients parameter with a Conditional parameter.

ConditionalCustomAttribute12

Optional

Microsoft.Exchange.Data.MultiValuedProperty

This parameter specifies a filter that's based on the value of the recipient's CustomAttribute1 to CustomAttribute15 property. For example, if you set the ConditionalCustomAttribute1 parameter to the value Marketing, all recipients whose CustomAttribute1 value is Marketing are included in this filter. You can specify multiple values separated by commas.

When you use multiple values for this parameter, the OR Boolean operator is applied. For more information about how Conditional parameters work, see the Detailed Description section of this topic.

You can't use this parameter with the RecipientFilter parameter. You need to use the IncludedRecipients parameter with a Conditional parameter.

ConditionalCustomAttribute13

Optional

Microsoft.Exchange.Data.MultiValuedProperty

This parameter specifies a filter that's based on the value of the recipient's CustomAttribute1 to CustomAttribute15 property. For example, if you set the ConditionalCustomAttribute1 parameter to the value Marketing, all recipients whose CustomAttribute1 value is Marketing are included in this filter. You can specify multiple values separated by commas.

When you use multiple values for this parameter, the OR Boolean operator is applied. For more information about how Conditional parameters work, see the Detailed Description section of this topic.

You can't use this parameter with the RecipientFilter parameter. You need to use the IncludedRecipients parameter with a Conditional parameter.

ConditionalCustomAttribute14

Optional

Microsoft.Exchange.Data.MultiValuedProperty

This parameter specifies a filter that's based on the value of the recipient's CustomAttribute1 to CustomAttribute15 property. For example, if you set the ConditionalCustomAttribute1 parameter to the value Marketing, all recipients whose CustomAttribute1 value is Marketing are included in this filter. You can specify multiple values separated by commas.

When you use multiple values for this parameter, the OR Boolean operator is applied. For more information about how Conditional parameters work, see the Detailed Description section of this topic.

You can't use this parameter with the RecipientFilter parameter. You need to use the IncludedRecipients parameter with a Conditional parameter.

ConditionalCustomAttribute15

Optional

Microsoft.Exchange.Data.MultiValuedProperty

This parameter specifies a filter that's based on the value of the recipient's CustomAttribute1 to CustomAttribute15 property. For example, if you set the ConditionalCustomAttribute1 parameter to the value Marketing, all recipients whose CustomAttribute1 value is Marketing are included in this filter. You can specify multiple values separated by commas.

When you use multiple values for this parameter, the OR Boolean operator is applied. For more information about how Conditional parameters work, see the Detailed Description section of this topic.

You can't use this parameter with the RecipientFilter parameter. You need to use the IncludedRecipients parameter with a Conditional parameter.

ConditionalCustomAttribute2

Optional

Microsoft.Exchange.Data.MultiValuedProperty

This parameter specifies a filter that's based on the value of the recipient's CustomAttribute1 to CustomAttribute15 property. For example, if you set the ConditionalCustomAttribute1 parameter to the value Marketing, all recipients whose CustomAttribute1 value is Marketing are included in this filter. You can specify multiple values separated by commas.

When you use multiple values for this parameter, the OR Boolean operator is applied. For more information about how Conditional parameters work, see the Detailed Description section of this topic.

You can't use this parameter with the RecipientFilter parameter. You need to use the IncludedRecipients parameter with a Conditional parameter.

ConditionalCustomAttribute3

Optional

Microsoft.Exchange.Data.MultiValuedProperty

This parameter specifies a filter that's based on the value of the recipient's CustomAttribute1 to CustomAttribute15 property. For example, if you set the ConditionalCustomAttribute1 parameter to the value Marketing, all recipients whose CustomAttribute1 value is Marketing are included in this filter. You can specify multiple values separated by commas.

When you use multiple values for this parameter, the OR Boolean operator is applied. For more information about how Conditional parameters work, see the Detailed Description section of this topic.

You can't use this parameter with the RecipientFilter parameter. You need to use the IncludedRecipients parameter with a Conditional parameter.

ConditionalCustomAttribute4

Optional

Microsoft.Exchange.Data.MultiValuedProperty

This parameter specifies a filter that's based on the value of the recipient's CustomAttribute1 to CustomAttribute15 property. For example, if you set the ConditionalCustomAttribute1 parameter to the value Marketing, all recipients whose CustomAttribute1 value is Marketing are included in this filter. You can specify multiple values separated by commas.

When you use multiple values for this parameter, the OR Boolean operator is applied. For more information about how Conditional parameters work, see the Detailed Description section of this topic.

You can't use this parameter with the RecipientFilter parameter. You need to use the IncludedRecipients parameter with a Conditional parameter.

ConditionalCustomAttribute5

Optional

Microsoft.Exchange.Data.MultiValuedProperty

This parameter specifies a filter that's based on the value of the recipient's CustomAttribute1 to CustomAttribute15 property. For example, if you set the ConditionalCustomAttribute1 parameter to the value Marketing, all recipients whose CustomAttribute1 value is Marketing are included in this filter. You can specify multiple values separated by commas.

When you use multiple values for this parameter, the OR Boolean operator is applied. For more information about how Conditional parameters work, see the Detailed Description section of this topic.

You can't use this parameter with the RecipientFilter parameter. You need to use the IncludedRecipients parameter with a Conditional parameter.

ConditionalCustomAttribute6

Optional

Microsoft.Exchange.Data.MultiValuedProperty

This parameter specifies a filter that's based on the value of the recipient's CustomAttribute1 to CustomAttribute15 property. For example, if you set the ConditionalCustomAttribute1 parameter to the value Marketing, all recipients whose CustomAttribute1 value is Marketing are included in this filter. You can specify multiple values separated by commas.

When you use multiple values for this parameter, the OR Boolean operator is applied. For more information about how Conditional parameters work, see the Detailed Description section of this topic.

You can't use this parameter with the RecipientFilter parameter. You need to use the IncludedRecipients parameter with a Conditional parameter.

ConditionalCustomAttribute7

Optional

Microsoft.Exchange.Data.MultiValuedProperty

This parameter specifies a filter that's based on the value of the recipient's CustomAttribute1 to CustomAttribute15 property. For example, if you set the ConditionalCustomAttribute1 parameter to the value Marketing, all recipients whose CustomAttribute1 value is Marketing are included in this filter. You can specify multiple values separated by commas.

When you use multiple values for this parameter, the OR Boolean operator is applied. For more information about how Conditional parameters work, see the Detailed Description section of this topic.

You can't use this parameter with the RecipientFilter parameter. You need to use the IncludedRecipients parameter with a Conditional parameter.

ConditionalCustomAttribute8

Optional

Microsoft.Exchange.Data.MultiValuedProperty

This parameter specifies a filter that's based on the value of the recipient's CustomAttribute1 to CustomAttribute15 property. For example, if you set the ConditionalCustomAttribute1 parameter to the value Marketing, all recipients whose CustomAttribute1 value is Marketing are included in this filter. You can specify multiple values separated by commas.

When you use multiple values for this parameter, the OR Boolean operator is applied. For more information about how Conditional parameters work, see the Detailed Description section of this topic.

You can't use this parameter with the RecipientFilter parameter. You need to use the IncludedRecipients parameter with a Conditional parameter.

ConditionalCustomAttribute9

Optional

Microsoft.Exchange.Data.MultiValuedProperty

This parameter specifies a filter that's based on the value of the recipient's CustomAttribute1 to CustomAttribute15 property. For example, if you set the ConditionalCustomAttribute1 parameter to the value Marketing, all recipients whose CustomAttribute1 value is Marketing are included in this filter. You can specify multiple values separated by commas.

When you use multiple values for this parameter, the OR Boolean operator is applied. For more information about how Conditional parameters work, see the Detailed Description section of this topic.

You can't use this parameter with the RecipientFilter parameter. You need to use the IncludedRecipients parameter with a Conditional parameter.

ConditionalDepartment

Optional

Microsoft.Exchange.Data.MultiValuedProperty

The ConditionalDepartment parameter specifies the department for the email address policy. It takes multiple values as a comma-delimited list. You must use the IncludedRecipients parameter if you use a Conditional parameter. You can't use this parameter if you use the RecipientFilter parameter.

ConditionalStateOrProvince

Optional

Microsoft.Exchange.Data.MultiValuedProperty

The ConditionalStateOrProvince parameter specifies the state or province for the email address policy. It takes multiple values as a comma-delimited list. You must use the IncludedRecipients parameter if you use a Conditional parameter. You can't use this parameter if you use the RecipientFilter parameter.

Confirm

Optional

System.Management.Automation.SwitchParameter

The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on if the cmdlet requires confirmation before proceeding.

  • Destructive cmdlets (for example, Remove-* cmdlets) have a built-in pause that forces you to acknowledge the command before proceeding. For these cmdlets, you can skip the confirmation prompt by using this exact syntax: -Confirm:$false.

  • Most other cmdlets (for example, New-* and Set-* cmdlets) don't have a built-in pause. For these cmdlets, specifying the Confirm switch without a value introduces a pause that forces you acknowledge the command before proceeding.

DisabledEmailAddressTemplates

Optional

Microsoft.Exchange.Data.ProxyAddressTemplateCollection

The DisabledEmailAddressTemplates parameter specifies the proxy addresses included in an email address policy that are disabled. It takes multiple values as a comma-delimited list.

DomainController

Optional

Microsoft.Exchange.Data.Fqdn

The DomainController parameter specifies the domain controller that's used by this cmdlet to read data from or write data to Active Directory. You identify the domain controller by its fully qualified domain name (FQDN). For example, dc01.contoso.com.

EnabledEmailAddressTemplates

Optional

Microsoft.Exchange.Data.ProxyAddressTemplateCollection

The EnabledEmailAddressTemplates parameter specifies the proxy addresses included in an email address policy that are enabled. It takes multiple values as a comma-delimited list.

EnabledPrimarySMTPAddressTemplate

Optional

System.String

The EnabledPrimarySMTPAddressTemplate parameter specifies the proxy addresses included in an email address policy that are enabled. It takes multiple values as a comma-delimited list.

ForceUpgrade

Optional

System.Management.Automation.SwitchParameter

The ForceUpgrade switch specifies whether to suppress the following confirmation: "To save changes on object, the object must be upgraded to the current Exchange version. After upgrade, this object cannot be managed by a previous version of Exchange System Manager. Do you want to continue to upgrade and save the object?"

IncludedRecipients

Optional

Microsoft.Exchange.Data.Directory.Recipient.WellKnownRecipientType

The IncludedRecipients parameter filters the recipient types used to build the global address list (GAL). The available values for the IncludedRecipients parameter include the following:

  • None

  • MailboxUsers

  • Resources

  • MailContacts

  • MailGroups

  • MailUsers

  • AllRecipients

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.

You must use this parameter if you're using any of the Conditional parameters. You can't use this parameter if you use the RecipientFilter parameter.

Name

Optional

System.String

The Name parameter specifies the new name for the email address policy.

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 filters the recipients used to build the email address policy 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.

RecipientFilter

Optional

System.String

The RecipientFilter parameter filters the recipients contained in a particular email address policy. The RecipientFilter parameter can't be used if any of the following parameters are specified:

  • ConditionalCompany

  • ConditionalDepartment

  • ConditionalStateOrProvince

  • IncludedRecipients

WhatIf

Optional

System.Management.Automation.SwitchParameter

The WhatIf switch simulates the actions of the command. You can use this switch to view the changes that would occur without actually applying those changes. You don't need to specify a value with this switch.

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.

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.

 
Show:
© 2016 Microsoft