New-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 New-EmailAddressPolicy cmdlet to create a new e-mail address policy.
Syntax
New-EmailAddressPolicy -Name <String> -EnabledPrimarySMTPAddressTemplate <String> -IncludedRecipients <Nullable> [-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>] [-DomainController <Fqdn>] [-Priority <EmailAddressPolicyPriority>] [-TemplateInstance <PSObject>]
New-EmailAddressPolicy -Name <String> -EnabledPrimarySMTPAddressTemplate <String> -RecipientFilter <String> [-DomainController <Fqdn>] [-Priority <EmailAddressPolicyPriority>] [-TemplateInstance <PSObject>]
New-EmailAddressPolicy -Name <String> -EnabledEmailAddressTemplates <ProxyAddressTemplateCollection> -RecipientFilter <String> [-DisabledEmailAddressTemplates <ProxyAddressTemplateCollection>] [-DomainController <Fqdn>] [-Priority <EmailAddressPolicyPriority>] [-TemplateInstance <PSObject>]
New-EmailAddressPolicy -Name <String> -EnabledEmailAddressTemplates <ProxyAddressTemplateCollection> -IncludedRecipients <Nullable> [-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>] [-Priority <EmailAddressPolicyPriority>] [-TemplateInstance <PSObject>]
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:
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 |
System.String |
The ConditionalCustomAttribute1 parameter specifies custom attributes. You can use these attributes to store additional information. |
ConditionalCustomAttribute10 |
Optional |
System.String |
The ConditionalCustomAttribute10 parameter specifies custom attributes. You can use these attributes to store additional information. |
ConditionalCustomAttribute11 |
Optional |
System.String |
The ConditionalCustomAttribute11 parameter specifies custom attributes. You can use these attributes to store additional information. |
ConditionalCustomAttribute12 |
Optional |
System.String |
The ConditionalCustomAttribute12 parameter specifies custom attributes. You can use these attributes to store additional information. |
ConditionalCustomAttribute13 |
Optional |
System.String |
The ConditionalCustomAttribute13 parameter specifies custom attributes. You can use these attributes to store additional information. |
ConditionalCustomAttribute14 |
Optional |
System.String |
The ConditionalCustomAttribute14 parameter specifies custom attributes. You can use these attributes to store additional information. |
ConditionalCustomAttribute15 |
Optional |
System.String |
The ConditionalCustomAttribute15 parameter specifies custom attributes. You can use these attributes to store additional information. |
ConditionalCustomAttribute2 |
Optional |
System.String |
The ConditionalCustomAttribute2 parameter specifies custom attributes. You can use these attributes to store additional information. |
ConditionalCustomAttribute3 |
Optional |
System.String |
The ConditionalCustomAttribute3 parameter specifies custom attributes. You can use these attributes to store additional information. |
ConditionalCustomAttribute4 |
Optional |
System.String |
The ConditionalCustomAttribute4 parameter specifies custom attributes. You can use these attributes to store additional information. |
ConditionalCustomAttribute5 |
Optional |
System.String |
The ConditionalCustomAttribute5 parameter specifies custom attributes. You can use these attributes to store additional information. |
ConditionalCustomAttribute6 |
Optional |
System.String |
The ConditionalCustomAttribute6 parameter specifies custom attributes. You can use these attributes to store additional information. |
ConditionalCustomAttribute7 |
Optional |
System.String |
The ConditionalCustomAttribute7 parameter specifies custom attributes. You can use these attributes to store additional information. |
ConditionalCustomAttribute8 |
Optional |
System.String |
The ConditionalCustomAttribute8 parameter specifies custom attributes. You can use these attributes to store additional information. |
ConditionalCustomAttribute9 |
Optional |
System.String |
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. |
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. |
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