Dela via


Understanding Custom Attributes

 

Applies to: Exchange Server 2010 SP3, Exchange Server 2010 SP2

Microsoft Exchange Server 2010 and Exchange Server 2007 include 15 extension attributes. You can use these attributes to add information about a recipient, such as an employee ID, organizational unit (OU), or some other custom value for which there isn't an existing attribute. These custom attributes are labeled in Active Directory as ms-Exch-Extension-Attribute1 through ms-Exch-Extension-Attribute15. In the Exchange Management Shell, the corresponding parameters are CustomAttribute1 through CustomAttribute15. These attributes aren't used by any Exchange components. They can be used to store Active Directory data without having to extend the Active Directory schema.

In Microsoft Exchange Server 2003 and earlier versions, if you wanted to store this information in Active Directory, you had to create an attribute by extending the Active Directory schema. Schema extension requires planning, procuring object identifiers (OIDs) for new attributes, and testing the extension process in a test environment before you implement it in a production environment. In Exchange 2010 and Microsoft Exchange Server 2007, user-defined Active Directory schema extensions can't be used in recipient filters used by address lists, e-mail address policies, and dynamic distribution groups.

Important

In Exchange 2003, you can create user-defined Active Directory schema extensions. However, in Exchange 2010, you can't use Exchange 2003 user-defined schema extensions as filterable properties. If your organization has user-defined schema extensions, we recommend that you use the 15 custom attributes defined by Exchange 2010 for each recipient. However, if the 15 custom attributes defined by Exchange don't meet the needs of your organization, we recommend that you don't upgrade objects that use user-defined schema extensions.

Contents

Advantages of Custom Attributes

Multivalued Custom Attributes

Custom Attributes Examples

Custom Attributes Example with the ConditionalCustomAttributes Parameter

Advantages of Custom Attributes

Some of the advantages of using custom attributes are:

  • You avoid extending the Active Directory schema.

  • The attributes are created by Exchange Setup.

  • You can use the Exchange Management Console (EMC) or the Exchange Management Shell to manage the attributes. You don't have to build custom controls or write scripts to populate and display these attributes.

  • The attributes are filterable properties that can be used in the Filter parameter with recipient cmdlets such as Get-Mailbox. They can also used in the EMC and in the Shell to create filters for e-mail address policies, address lists, and dynamic distribution groups.

Return to top

Multivalued Custom Attributes

In Microsoft Exchange 2010 Service Pack 2 (SP2), five multivalued custom attributes were added to let you store additional information for mail recipients if the traditional custom attributes don’t meet your needs. The ExtensionCustomAttribute1 through ExtensionCustomAttribute5 parameters can hold up to 1,300 values each. You can specify multiple values as a comma-delimited list. The following cmdlets support these new parameters:

For more information about multivalued properties, see Modifying Multivalued Properties.

Custom Attribute Examples

In many Exchange deployments, creating an e-mail address policy for all recipients in an OU is a common scenario. The OU isn't a filterable property that can be used in the RecipientFilter parameter of an e-mail address policy or an address list.

Note

Dynamic distribution groups have an additional parameter that you can use to restrict it to recipients in a particular OU or container.

If the recipients in that OU don't share any common properties that you can filter by, such as department or location, you can populate one of the custom attributes with a common value, as shown in this example.

Get-Mailbox -OrganizationalUnit Sales | Set-Mailbox CustomAttribute1 "SalesOU"

Now you can create an e-mail address policy for all recipients that have the CustomAttribute1 property that equals SalesOU, as shown in this example.

New-EmailAddressPolicy -Name "Sales" -RecipientFilter { CustomAttribute1 -eq "SalesOU"} -EnabledEmailAddressTemplates "SMTP:%s%2g@sales.contoso.com"

Return to top

Custom Attribute Example with the ConditionalCustomAttributes Parameter

When creating dynamic distribution groups, e-mail address policies, or address lists, you don't need to use the RecipeintFilter parameter to specify custom attributes. You can use the ConditionalCustomAttribute1 to ConditionalCustomAttribute15 parameters instead. You can create a dynamic distribution group based on the recipients whose CustomAttribute1 is set to SalesOU, as shown in this example.

New-DynamicDistributionGroup -Name "Sales Users and Contacts" -IncludedRecipients "MailboxUsers,MailContacts" -ConditionalCustomAttribute1 "SalesOU"

Note

You must use the IncludedRecipients parameter if you use a Conditional parameter. In addition, you can't use Conditional parameters if you use the RecipientFilter parameter. If you want to include additional filters to create your dynamic distribution group, e-mail address policies, or address lists, you should use the RecipientFilter parameter.

Return to top

 © 2010 Microsoft Corporation. All rights reserved.