Export (0) Print
Expand All

Enable-MailContact

Applies to: Exchange Server 2010

Topic Last Modified: 2011-03-19

Use the Enable-MailContact cmdlet to mail-enable an existing contact in Active Directory.


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

Parameter Required Type Description

ExternalEmailAddress

Required

Microsoft.Exchange.Data.ProxyAddress

The ExternalEmailAddress parameter specifies the target e-mail address.

Identity

Required

Microsoft.Exchange.Configuration.Tasks.ContactIdParameter

The Identity parameter specifies the identity of the contact. You can use one of the following values:

  • ADObjectID
  • GUID
  • Distinguished name (DN)
  • Domain\SamAccountName
  • user principal name (UPN)
  • LegacyExchangeDN
  • E-mail address
  • Contact alias

Alias

Optional

System.String

The Alias parameter specifies the alias of the mail-enabled contact.

Confirm

Optional

System.Management.Automation.SwitchParameter

The Confirm switch 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 switch.

DisplayName

Optional

System.String

The DisplayName parameter specifies the contact's display name.

DomainController

Optional

Microsoft.Exchange.Data.Fqdn

The DomainController parameter specifies the fully qualified domain name (FQDN) of the domain controller that writes this configuration change to Active Directory.

MacAttachmentFormat

Optional

Microsoft.Exchange.Data.Directory.Recipient.MacAttachmentFormat

The MacAttachmentFormat parameter specifies the Apple Macintosh operating system attachment format for messages 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 only use 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 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 only be set 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 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 only be set to Text. Therefore, if you want to change the MessageFormat parameter from Mime to Text, you must also change the MessageBodyFormat parameter to Text.

PrimarySmtpAddress

Optional

Microsoft.Exchange.Data.SmtpAddress

The PrimarySmtpAddress parameter specifies the primary SMTP address for the mail contact. By default, the primary SMTP address is generated based on the default e-mail address policy. If you specify a primary SMTP address by using this parameter, the command sets the EmailAddressPolicyEnabled attribute of the mail contact to $false, and the e-mail addresses of this mail contact aren't automatically updated based on e-mail address policies.

UsePreferMessageFormat

Optional

System.Boolean

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

WhatIf

Optional

System.Management.Automation.SwitchParameter

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

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

You need to be assigned permissions before you can run this cmdlet. Although all parameters for this cmdlet are listed in this topic, you may not have access to some parameters if they're not included in the permissions assigned to you. To see what permissions you need, see the "Recipient Provisioning Permissions" section in the Mailbox Permissions topic.

Error Description

 

Exceptions Description

 

This example mail-enables an existing contact in Active Directory and provides the contact with the external e-mail address roland@tailspintoys.com.

Enable-MailContact -Identity Roland -ExternalEmailAddress "roland@tailspintoys.com"
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft