Share via


New-EmailAddressPolicy

 

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

Use the New-EmailAddressPolicy cmdlet to create a new e-mail address policy.

Syntax

New-EmailAddressPolicy -Name <String> -EnabledPrimarySMTPAddressTemplate <String> -IncludedRecipients <Nullable> [-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>]] [-DomainController <Fqdn>] [-Priority <EmailAddressPolicyPriority>] [-TemplateInstance <PSObject>] [-UseRusServer <String>] [-WhatIf [<SwitchParameter>]]

New-EmailAddressPolicy -Name <String> -EnabledEmailAddressTemplates <ProxyAddressTemplateCollection> -RecipientFilter <String> [-Confirm [<SwitchParameter>]] [-DisabledEmailAddressTemplates <ProxyAddressTemplateCollection>] [-DomainController <Fqdn>] [-Priority <EmailAddressPolicyPriority>] [-TemplateInstance <PSObject>] [-UseRusServer <String>] [-WhatIf [<SwitchParameter>]]

New-EmailAddressPolicy -Name <String> -EnabledPrimarySMTPAddressTemplate <String> -RecipientFilter <String> [-Confirm [<SwitchParameter>]] [-DomainController <Fqdn>] [-Priority <EmailAddressPolicyPriority>] [-TemplateInstance <PSObject>] [-UseRusServer <String>] [-WhatIf [<SwitchParameter>]]

New-EmailAddressPolicy -Name <String> -EnabledEmailAddressTemplates <ProxyAddressTemplateCollection> -IncludedRecipients <Nullable> [-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>] [-Priority <EmailAddressPolicyPriority>] [-TemplateInstance <PSObject>] [-UseRusServer <String>] [-WhatIf [<SwitchParameter>]]

Detailed Description

The New-EmailAddressPolicy cmdlet creates a new e-mail address policy and applies it. The new e-mail address policy is created under the Microsoft Exchange organization configuration container in the Active Directory directory service.

To run the New-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 Exchange Server 2007, see Permission Considerations.

Parameters

Parameter Required Type Description

EnabledEmailAddressTemplates

Required

Microsoft.Exchange.Data.ProxyAddressTemplateCollection

The EnabledEmailAddressTemplates parameter specifies the proxy addresses that are included in an e-mail 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 that is enabled and included in an e-mail address policy. The domain part of each proxy address needs to match an existing accepted domain.

IncludedRecipients

Required

System.Nullable

The IncludedRecipients parameter filters recipients that are used to set the e-mail 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 for the e-mail address policy.

RecipientFilter

Required

System.String

The RecipientFilter parameter specifies a filter for recipients to include in the e-mail address policy. You cannot use this parameter if you use any of the following filter parameters:

  • ConditionalCompany

  • ConditionalDepartment

  • IncludedRecipients

  • ConditionalStateOrProvince

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

ConditionalCompany

Optional

Microsoft.Exchange.Data.MultiValuedProperty

The ConditionalCompany parameter filters by company. It takes multiple values as a comma-delimited list.

ConditionalCustomAttribute1

Optional

Microsoft.Exchange.Data.MultiValuedProperty

The ConditionalCustomAttribute1 parameter specifies custom attributes. You can use these attributes to store additional information.

ConditionalCustomAttribute10

Optional

Microsoft.Exchange.Data.MultiValuedProperty

The ConditionalCustomAttribute10 parameter specifies custom attributes. You can use these attributes to store additional information.

ConditionalCustomAttribute11

Optional

Microsoft.Exchange.Data.MultiValuedProperty

The ConditionalCustomAttribute11 parameter specifies custom attributes. You can use these attributes to store additional information.

ConditionalCustomAttribute12

Optional

Microsoft.Exchange.Data.MultiValuedProperty

The ConditionalCustomAttribute12 parameter specifies custom attributes. You can use these attributes to store additional information.

ConditionalCustomAttribute13

Optional

Microsoft.Exchange.Data.MultiValuedProperty

The ConditionalCustomAttribute13 parameter specifies custom attributes. You can use these attributes to store additional information.

ConditionalCustomAttribute14

Optional

Microsoft.Exchange.Data.MultiValuedProperty

The ConditionalCustomAttribute14 parameter specifies custom attributes. You can use these attributes to store additional information.

ConditionalCustomAttribute15

Optional

Microsoft.Exchange.Data.MultiValuedProperty

The ConditionalCustomAttribute15 parameter specifies custom attributes. You can use these attributes to store additional information.

ConditionalCustomAttribute2

Optional

Microsoft.Exchange.Data.MultiValuedProperty

The ConditionalCustomAttribute2 parameter specifies custom attributes. You can use these attributes to store additional information.

ConditionalCustomAttribute3

Optional

Microsoft.Exchange.Data.MultiValuedProperty

The ConditionalCustomAttribute3 parameter specifies custom attributes. You can use these attributes to store additional information.

ConditionalCustomAttribute4

Optional

Microsoft.Exchange.Data.MultiValuedProperty

The ConditionalCustomAttribute4 parameter specifies custom attributes. You can use these attributes to store additional information.

ConditionalCustomAttribute5

Optional

Microsoft.Exchange.Data.MultiValuedProperty

The ConditionalCustomAttribute5 parameter specifies custom attributes. You can use these attributes to store additional information.

ConditionalCustomAttribute6

Optional

Microsoft.Exchange.Data.MultiValuedProperty

The ConditionalCustomAttribute6 parameter specifies custom attributes. You can use these attributes to store additional information.

ConditionalCustomAttribute7

Optional

Microsoft.Exchange.Data.MultiValuedProperty

The ConditionalCustomAttribute7 parameter specifies custom attributes. You can use these attributes to store additional information.

ConditionalCustomAttribute8

Optional

Microsoft.Exchange.Data.MultiValuedProperty

The ConditionalCustomAttribute8 parameter specifies custom attributes. You can use these attributes to store additional information.

ConditionalCustomAttribute9

Optional

Microsoft.Exchange.Data.MultiValuedProperty

The ConditionalCustomAttribute9 parameter specifies custom attributes. You can use these attributes to store additional information.

ConditionalDepartment

Optional

Microsoft.Exchange.Data.MultiValuedProperty

The ConditionalDepartment parameter filters by department. It takes multiple values as a comma-delimited list.

ConditionalStateOrProvince

Optional

Microsoft.Exchange.Data.MultiValuedProperty

The ConditionalStateOrProvince parameter filters by state or province. It takes multiple values as a comma-delimited list.

Confirm

Optional

System.Management.Automation.SwitchParameter

The Confirm parameter 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 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 writes this configuration change to Active Directory, include the DomainController parameter in the command.

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.

TemplateInstance

Optional

System.Management.Automation.PSObject

When an existing object is supplied to the TemplateInstance parameter, the command uses that object's configuration to create an exact duplicate of the object on a local or target server.

UseRusServer

Optional

System.String

noteNote:
This parameter is available only in Exchange 2007 SP2.

The UseRusServer parameter instructs the command to use the specified Mailbox server on which the Address List service is running to obtain and then set mailbox and Active Directory user attributes.

The Address List service is a component in the Exchange System Attendant service. The Address List service creates and maintains Exchange-specific attribute values in Active Directory. You can use the Address List service to update recipient objects in a domain by using specific information, such as address list membership and e-mail addresses.

WhatIf

Optional

System.Management.Automation.SwitchParameter

The WhatIf parameter instructs the command to simulate the actions that it would take on the object. By using the WhatIf parameter, 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 parameter.

Input Types

Return Types

Errors

Error Description

Exceptions

Exceptions Description

Example

The following code is an example of the New-EmailAddressPolicy command.

New-EmailAddressPolicy -Name "MyPolicy" -IncludedRecipients MailboxUsers -EnabledPrimarySMTPAddressTemplate SMTP:@contoso.com