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

You can use the Enable-MailUser cmdlet to mail-enable an existing user in the Active Directory directory service.

Syntax

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

Parameters

Parameter Required Type Description

ExternalEmailAddress

Required

Microsoft.Exchange.Data.ProxyAddress

The ExternalEmailAddress parameter specifies an e-mail address outside of the organization. By default, the email address that is specified in the ExternalEmailAddress parameter is set as the PrimarySMTPAddress. E-mail messages that are sent to the mail-enabled user are sent to this external address.

Identity

Required

Microsoft.Exchange.Configuration.Tasks.UserIdParameter

The Identity parameter takes one of the following values:

  • ADObjectID

  • GUID

  • Distinguished name (DN)

  • Domain\SamAccountName

  • User principal name (UPN)

  • LegacyExchangeDN

  • User alias

Alias

Optional

System.String

The Alias parameter specifies the alias of the user. An alias can contain letters, numerals, and the following punctuation marks and symbols:

  • !

  • #

  • $

  • %

  • ^

  • &

  • *

  • +

  • -

  • .

  • /

  • =

  • ?

  • _

  • {

  • }

  • |

  • ~

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.

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 user. 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 use only the BinHex or UUENCODE values for this parameter. If the MessageFormat parameter is set to Mime, you can use only the 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 user. 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 that are sent to the mail user.

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.

UsePreferMessageFormat

Optional

System.Boolean

The UsePreferMessageFormat parameter specifies whether the message format settings configured for the mailbox will override the global settings configured for the domain. Set this parameter to $true to have the message format settings configured for the mailbox to override any global settings.

Detailed Description

The Enable-MailUser cmdlet mail-enables an existing user in Active Directory by adding the attributes that are required by Microsoft Exchange Server 2007. The user's identity and an external e-mail address are required. Mail-enabled users have an e-mail address at the Exchange organization (for example, john@contoso.com), but they do not have an Exchange mailbox. E-mail messages that are addressed to the mail-enabled user are sent instead to the specified external e-mail address.

For more information, see How to Create a New Mail-Enabled User.

To run the Enable-MailUser 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.

Note:
To create a new user who is mail-enabled at the time of creation, use the New-MailUser cmdlet.

Input Types

Return Types

Errors

Error Description

 

Exceptions

Exceptions Description

 

Example

In this example, the Enable-MailUser command is used to mail-enable user John with the external e-mail address john@contoso.com.

Copy Code
Enable-MailUser -Identity John -ExternalEmailAddress john@contoso.com