Set-EmailAddressPolicy (RTM)

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

Use the Set-EmailAddressPolicy cmdlet to set the Active Directory directory service attributes for an e-mail address policy.

Syntax

Set-EmailAddressPolicy -Identity <EmailAddressPolicyIdParameter> [-ConditionalCompany <MultiValuedProperty>] [-ConditionalCustomAttribute1 <String>] [-ConditionalCustomAttribute10 <String>] [-ConditionalCustomAttribute11 <String>] [-ConditionalCustomAttribute12 <String>] [-ConditionalCustomAttribute13 <String>] [-ConditionalCustomAttribute14 <String>] [-ConditionalCustomAttribute15 <String>] [-ConditionalCustomAttribute2 <String>] [-ConditionalCustomAttribute3 <String>] [-ConditionalCustomAttribute4 <String>] [-ConditionalCustomAttribute5 <String>] [-ConditionalCustomAttribute6 <String>] [-ConditionalCustomAttribute7 <String>] [-ConditionalCustomAttribute8 <String>] [-ConditionalCustomAttribute9 <String>] [-ConditionalDepartment <MultiValuedProperty>] [-ConditionalStateOrProvince <MultiValuedProperty>] [-DisabledEmailAddressTemplates <ProxyAddressTemplateCollection>] [-DomainController <Fqdn>] [-EnabledEmailAddressTemplates <ProxyAddressTemplateCollection>] [-EnabledPrimarySMTPAddressTemplate <String>] [-ForceUpgrade <SwitchParameter>] [-IncludedRecipients <Nullable>] [-Name <String>] [-Priority <EmailAddressPolicyPriority>] [-RecipientFilter <String>]

Set-EmailAddressPolicy [-ConditionalCompany <MultiValuedProperty>] [-ConditionalCustomAttribute1 <String>] [-ConditionalCustomAttribute10 <String>] [-ConditionalCustomAttribute11 <String>] [-ConditionalCustomAttribute12 <String>] [-ConditionalCustomAttribute13 <String>] [-ConditionalCustomAttribute14 <String>] [-ConditionalCustomAttribute15 <String>] [-ConditionalCustomAttribute2 <String>] [-ConditionalCustomAttribute3 <String>] [-ConditionalCustomAttribute4 <String>] [-ConditionalCustomAttribute5 <String>] [-ConditionalCustomAttribute6 <String>] [-ConditionalCustomAttribute7 <String>] [-ConditionalCustomAttribute8 <String>] [-ConditionalCustomAttribute9 <String>] [-ConditionalDepartment <MultiValuedProperty>] [-ConditionalStateOrProvince <MultiValuedProperty>] [-DisabledEmailAddressTemplates <ProxyAddressTemplateCollection>] [-DomainController <Fqdn>] [-EnabledEmailAddressTemplates <ProxyAddressTemplateCollection>] [-EnabledPrimarySMTPAddressTemplate <String>] [-ForceUpgrade <SwitchParameter>] [-IncludedRecipients <Nullable>] [-Instance <EmailAddressPolicy>] [-Name <String>] [-Priority <EmailAddressPolicyPriority>] [-RecipientFilter <String>]

Detailed Description

The Set-EmailAddressPolicy cmdlet allows administrators to set the Active Directory attributes for a specific e-mail address policy. The Set-EmailAddressPolicy cmdlet, however, does not apply the changes to the e-mail address policy. Use the Update-EmailAddressPolicy cmdlet following a Set-EmailAddressPolicy cmdlet for the changes to be applied.

To run the Set-EmailAddressPolicy cmdlet, 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.

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

Parameters

Parameter Required Type Description

Identity

Required

Microsoft.Exchange.Configuration.Tasks.EmailAddressPolicyIdParameter

Use the Identity parameter to specify the GUID, distinguished name, or e-mail address policy name that represents a specific e-mail address policy. You can also include the path using the format Path\EmailAddressPolicy.

You can omit the parameter label Identity so that only the e-mail address policy name or GUID

ConditionalCompany

Optional

Microsoft.Exchange.Data.MultiValuedProperty

The ConditionalCompany parameter sets the company for the e-mail address policy. It takes multiple values as a comma-delimited list. You must use the IncludedRecipients parameter if you use a Conditional parameter. You cannot use this parameter if you use the RecipientFilter parameter.

ConditionalCustomAttribute1

Optional

System.String

The ConditionalCustomAttribute1 parameter specifies custom attributes. You can use these attributes to store additional information. You must use the IncludedRecipients parameter if you use a Conditional parameter. You cannot use this parameter if you use the RecipientFilter parameter.

ConditionalCustomAttribute10

Optional

System.String

The ConditionalCustomAttribute10 parameter specifies custom attributes. You can use these attributes to store additional information. You must use the IncludedRecipients parameter if you use a Conditional parameter. You cannot use this parameter if you use the RecipientFilter parameter.

ConditionalCustomAttribute11

Optional

System.String

The ConditionalCustomAttribute11 parameter specifies custom attributes. You can use these attributes to store additional information. You must use the IncludedRecipients parameter if you use a Conditional parameter. You cannot use this parameter if you use the RecipientFilter parameter.

ConditionalCustomAttribute12

Optional

System.String

The ConditionalCustomAttribute12 parameter specifies custom attributes. You can use these attributes to store additional information. You must use the IncludedRecipients parameter if you use a Conditional parameter. You cannot use this parameter if you use the RecipientFilter parameter.

ConditionalCustomAttribute13

Optional

System.String

The ConditionalCustomAttribute13 parameter specifies custom attributes. You can use these attributes to store additional information. You must use the IncludedRecipients parameter if you use a Conditional parameter. You cannot use this parameter if you use the RecipientFilter parameter.

ConditionalCustomAttribute14

Optional

System.String

The ConditionalCustomAttribute14 parameter specifies custom attributes. You can use these attributes to store additional information. You must use the IncludedRecipients parameter if you use a Conditional parameter. You cannot use this parameter if you use the RecipientFilter parameter.

ConditionalCustomAttribute15

Optional

System.String

The ConditionalCustomAttribute15 parameter specifies custom attributes. You can use these attributes to store additional information. You must use the IncludedRecipients parameter if you use a Conditional parameter. You cannot use this parameter if you use the RecipientFilter parameter.

ConditionalCustomAttribute2

Optional

System.String

The ConditionalCustomAttribute2 parameter specifies custom attributes. You can use these attributes to store additional information. You must use the IncludedRecipients parameter if you use a Conditional parameter. You cannot use this parameter if you use the RecipientFilter parameter.

ConditionalCustomAttribute3

Optional

System.String

The ConditionalCustomAttribute3 parameter specifies custom attributes. You can use these attributes to store additional information. You must use the IncludedRecipients parameter if you use a Conditional parameter. You cannot use this parameter if you use the RecipientFilter parameter.

ConditionalCustomAttribute4

Optional

System.String

The ConditionalCustomAttribute4 parameter specifies custom attributes. You can use these attributes to store additional information. You must use the IncludedRecipients parameter if you use a Conditional parameter. You cannot use this parameter if you use the RecipientFilter parameter.

ConditionalCustomAttribute5

Optional

System.String

The ConditionalCustomAttribute5 parameter specifies custom attributes. You can use these attributes to store additional information. You must use the IncludedRecipients parameter if you use a Conditional parameter. You cannot use this parameter if you use the RecipientFilter parameter.

ConditionalCustomAttribute6

Optional

System.String

The ConditionalCustomAttribute6 parameter specifies custom attributes. You can use these attributes to store additional information. You must use the IncludedRecipients parameter if you use a Conditional parameter. You cannot use this parameter if you use the RecipientFilter parameter.

ConditionalCustomAttribute7

Optional

System.String

The ConditionalCustomAttribute7 parameter specifies custom attributes. You can use these attributes to store additional information. You must use the IncludedRecipients parameter if you use a Conditional parameter. You cannot use this parameter if you use the RecipientFilter parameter.

ConditionalCustomAttribute8

Optional

System.String

The ConditionalCustomAttribute8 parameter specifies custom attributes. You can use these attributes to store additional information. You must use the IncludedRecipients parameter if you use a Conditional parameter. You cannot use this parameter if you use the RecipientFilter parameter.

ConditionalCustomAttribute9

Optional

System.String

The ConditionalCustomAttribute9 parameter specifies custom attributes. You can use these attributes to store additional information. You must use the IncludedRecipients parameter if you use a Conditional parameter. You cannot use this parameter if you use the RecipientFilter parameter.

ConditionalDepartment

Optional

Microsoft.Exchange.Data.MultiValuedProperty

The ConditionalDepartment parameter sets the department for the e-mail address policy. It takes multiple values as a comma-delimited list. You must use the IncludedRecipients parameter if you use a Conditional parameter. You cannot use this parameter if you use the RecipientFilter parameter.

ConditionalStateOrProvince

Optional

Microsoft.Exchange.Data.MultiValuedProperty

The ConditionalStateOrProvince parameter sets the state or province for the e-mail address policy. It takes multiple values as a comma-delimited list. You must use the IncludedRecipients parameter if you use a Conditional parameter. You cannot use this parameter if you use the RecipientFilter parameter.

DisabledEmailAddressTemplates

Optional

Microsoft.Exchange.Data.ProxyAddressTemplateCollection

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

DomainController

Optional

Microsoft.Exchange.Data.Fqdn

To specify the fully qualified domain name (FQDN) of the domain controller that retrieves data from Active Directory, include the DomainController parameter in the command.

EnabledEmailAddressTemplates

Optional

Microsoft.Exchange.Data.ProxyAddressTemplateCollection

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

EnabledPrimarySMTPAddressTemplate

Optional

System.String

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

ForceUpgrade

Optional

System.Management.Automation.SwitchParameter

The ForceUpgrade parameter suppresses 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?" This confirmation occurs when you upgrade an e-mail address policy that was created in Microsoft Exchange Server 2003 or Exchange 2000 Server. You cannot manage an Exchange 2003 or Exchange 2000 e-mail address policy by using the Exchange Management Console until you update the object's version and change the recipient filter by using either the RecipientFilter, or the IncludedRecipients parameters.

IncludedRecipients

Optional

System.Nullable

The IncludedRecipients parameter filters the recipient types that are used to build the global address list (GAL). The available values for the IncludedRecipients parameter are AllRecipients, MailboxUsers, Resources, Contacts, and MailGroups.

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 are using the any of the Conditional parameters. You cannot use this parameter if you use the RecipientFilter parameter.

Instance

Optional

Microsoft.Exchange.Data.Directory.SystemConfiguration.EmailAddressPolicy

The Instance parameter enables you to pass an entire object to the command to be processed. It is mainly used in scripts where an entire object must be passed to the command.

Name

Optional

System.String

The Name parameter specifies the new name for the e-mail address policy.

Priority

Optional

Microsoft.Exchange.Data.Directory.SystemConfiguration.EmailAddressPolicyPriority

The Priority parameter makes the current priority higher than the priority specified as an argument for this parameter.

RecipientFilter

Optional

System.String

The RecipientFilter parameter filters the recipients that are contained in a particular e-mail address policy. The RecipientFilter parameter cannot be used if any of the following parameters are specified:

  • ConditionalCompany

  • ConditionalDepartment

  • ConditionalStateOrProvince

  • IncludedRecipients

For more information about the filterable properties, see Filterable Properties for the -RecipientFilter parameter.

Input Types

Return Types

Errors

Error Description

Exceptions

Exceptions Description

Example

The following code is an example of the Set-EmailAddressPolicy command in which the e-mail address policy's name is being changed from EMAIL_ADDRESS_POLICY01 to EMAILADDRESSPOLICY02.

Set-EmailAddressPolicy -Identity EMAIL_ADDRESS_POLICY01 -Name EMAIL_ADDRESS_POLICY02