Applies to: Exchange Server 2007
Topic Last Modified: 2010-03-30

You can use the Enable-MailContact command to mail-enable an existing contact in Active Directory.

Syntax

Enable-MailContact -Identity <ContactIdParameter> -ExternalEmailAddress <ProxyAddress> [-Alias <String>] [-DisplayName <String>] [-DomainController <Fqdn>] [-MacAttachmentFormat <BinHex | UuEncode | AppleSingle | AppleDouble>] [-MessageBodyFormat <Text | Html | TextAndHtml>] [-MessageFormat <Text | Mime>] [-UsePreferMessageFormat <$true | $false>]

Parameters

Parameter Required Type Description

Alias

Optional

System.String

This parameter specifies the alias of the mail-enabled contact.

ExternalEmailAddress

Required

Microsoft.Exchange.Data.ProxyAddress

This parameter specifies the target e-mail address. By default, the email address that is specified in the ExternalEmailAddress parameter is set as the PrimarySMTPAddress.

Identity

Required

Microsoft.Exchange.Configuration.Tasks.ContactIdParameter

This parameter takes one of the following values:

  • ADObjectID

  • GUID

  • distinguished name

  • Domain\SamAccountName

  • user principal name (UPN)

  • LegacyExchangeDN

  • E-mail address

  • Contact alias

DisplayName

Optional

System.String

This parameter specifies the contact's display name.

DomainController

Optional

Microsoft.Exchange.Data.Fqdn

To specify the fully qualified domain name of the domain controller that writes this configuration change to Active Directory, include the DomainController parameter on the command.

MacAttachmentFormat

Optional

Microsoft.Exchange.Data.Directory.Recipient.MacAttachmentFormat

The MacAttachmentFormat parameter specifies the Apple Macintosh Operating System attachment format for messages that are sent to the mail contact. The valid values for this parameter are:

  • BinHex

  • UUENCODE

  • AppleSingle

  • AppleDouble

By default, this parameter is set to BinHex.

The acceptable values for the MacAttachmentFormat parameter are dependent on the MessageFormat parameter. If the MessageFormat parameter is set to Text, you can only use BinHex or UUENCODE values for this parameter. If the MessageFormat parameter is set to Mime, you can use only BinHex, AppleSingle or AppleDouble values for this parameter.

MessageBodyFormat

Optional

Microsoft.Exchange.Data.Directory.Recipient.MessageBodyFormat

The MessageBodyFormat parameter specifies the message body format for messages that are sent to the mail contact. The valid values for this parameter are:

  • Text

  • Html

  • TextAndHtml

By default, this parameter is set to TextAndHtml.

The MessageFormat and MessageBodyFormat parameters are interdependent. If the MessageFormat parameter is set to Mime, the MessageBodyFormat parameter can be set to any valid value. However, if the MessageFormat parameter is set to Text, the MessageBodyFormat parameter can be set only to Text. Therefore, if you want to set this parameter to Html or TextAndHtml, you must also set the MessageFormat parameter to Mime.

MessageFormat

Optional

Microsoft.Exchange.Data.Directory.Recipient.MessageFormat

The MessageFormat parameter specifies the message format for messages that are sent to the mail contact.

The valid values for this parameter are:

  • Text

  • Mime

By default, this parameter is set to Mime.

The MessageFormat and MessageBodyFormat parameters are interdependent. If the MessageFormat parameter is set to Mime, the MessageBodyFormat parameter can be set to any valid value. However, if the MessageFormat parameter is set to Text, the MessageBodyFormat parameter can be set only to Text. Therefore, if you want to change the MessageFormat parameter from Mime to Text, you must also change the MessageBodyFormat parameter to Text.

UsePreferMessageFormat

Optional

System.Boolean

When set to true, this parameter specifies that the recipient preferred message format settings will override the global settings for mail sent to this user.

Detailed Description

This command mail-enables an existing contact in Active Directory by adding the attributes that are required by Microsoft Exchange Server 2007. The contact's identity, associated alias, and a target e-mail address are required to mail-enable a contact.

To run the Enable-MailContact cmdlet, you must delegate the following role to the account that you use:

  • Exchange Recipient Administrator role

For more information about permissions, about delegating roles, and about the rights that are required to administer Exchange Server 2007, see Permission Considerations.

Input Types

Return Types

Errors

Error Description

 

Exceptions

Exceptions Description

 

Example

In this example, the Enable-MailContact command is used to mail-enable an existing contact in Active Directory and provide the contact with the external e-mail address "ted@tailspintoys.com."

Copy Code
Enable-MailContact -Identity Ted -ExternalEmailAddress "ted@tailspintoys.com"

Note that the Enable-MailContact command cannot create a new contact in Active Directory. Use the New-MailContact command to create a new contact.