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

Topic Last Modified: 2012-11-16

Use the Enable-MailUser cmdlet to mail-enable an existing user in Active Directory.

Syntax

Enable-MailUser -Identity <UserIdParameter> -ExternalEmailAddress <ProxyAddress> [-Alias <String>] [-BypassModerationCheck <SwitchParameter>] [-Confirm [<SwitchParameter>]] [-DisplayName <String>] [-DomainController <Fqdn>] [-MacAttachmentFormat <BinHex | UuEncode | AppleSingle | AppleDouble>] [-MessageBodyFormat <Text | Html | TextAndHtml>] [-MessageFormat <Text | Mime>] [-PrimarySmtpAddress <SmtpAddress>] [-SKUAssigned <$true | $false>] [-SKUCapability <None | BPOS_S_Deskless | BPOS_S_Standard | BPOS_S_Enterprise | BPOS_S_Archive | BPOS_L_Standard | BPOS_B_Standard | TOU_Signed | FederatedUser | Partner_Managed | MasteredOnPremise | ResourceMailbox | ExcludedFromBackSync | UMFeatureRestricted | RichCoexistence>] [-UsageLocation <CountryInfo>] [-UsePreferMessageFormat <$true | $false>] [-WhatIf [<SwitchParameter>]]
Enable-MailUser -Identity <UserIdParameter> -ArchiveGuid <Guid> [-Alias <String>] [-Archive <SwitchParameter>] [-ArchiveName <MultiValuedProperty>] [-BypassModerationCheck <SwitchParameter>] [-Confirm [<SwitchParameter>]] [-DisplayName <String>] [-DomainController <Fqdn>] [-PrimarySmtpAddress <SmtpAddress>] [-SKUAssigned <$true | $false>] [-SKUCapability <None | BPOS_S_Deskless | BPOS_S_Standard | BPOS_S_Enterprise | BPOS_S_Archive | BPOS_L_Standard | BPOS_B_Standard | TOU_Signed | FederatedUser | Partner_Managed | MasteredOnPremise | ResourceMailbox | ExcludedFromBackSync | UMFeatureRestricted | RichCoexistence>] [-WhatIf [<SwitchParameter>]]

Detailed Description

The Enable-MailUser cmdlet mail-enables an existing user in Active Directory by adding the attributes that are required by Microsoft Exchange. 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 don't have an Exchange mailbox. E-mail messages addressed to the mail-enabled user are sent instead to the specified external e-mail address.

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

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.

Parameters

Parameter Required Type Description

Identity

Required

Microsoft.Exchange.Configuration.Tasks.UserIdParameter

The Identity parameter specifies the identity of the mail user object.

This parameter accepts the following values:

  • Alias

    Example: JPhillips

  • Canonical DN

    Example: Atlanta.Corp.Contoso.Com/Users/JPhillips

  • Display Name

    Example: Jeff Phillips

  • Distinguished Name (DN)

    Example: CN=JPhillips,CN=Users,DC=Atlanta,DC=Corp,DC=contoso,DC=com

  • Domain\Account

    Example: Atlanta\JPhillips

  • GUID

    Example: fb456636-fe7d-4d58-9d15-5af57d0354c2

  • Immutable ID

    Example: fb456636-fe7d-4d58-9d15-5af57d0354c2@contoso.com

  • Legacy Exchange DN

    Example: /o=Contoso/ou=AdministrativeGroup/cn=Recipients/cn=JPhillips

  • SMTP Address

    Example: Jeff.Phillips@contoso.com

  • User Principal Name

    Example: JPhillips@contoso.com

ArchiveGuid

Required

System.Guid

This parameter is reserved for internal Microsoft use.

ExternalEmailAddress

Required

Microsoft.Exchange.Data.ProxyAddress

The ExternalEmailAddress parameter specifies an e-mail address outside the organization. E-mail messages sent to the mail-enabled user are sent to this external address.

Alias

Optional

System.String

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

  • !

  • #

  • $

  • %

  • ^

  • &

  • *

  • +

  • -

  • .

  • /

  • =

  • ?

  • _

  • {

  • }

  • |

  • ~

Archive

Optional

System.Management.Automation.SwitchParameter

This parameter is reserved for internal Microsoft use.

ArchiveName

Optional

Microsoft.Exchange.Data.MultiValuedProperty

This parameter is reserved for internal Microsoft use.

BypassModerationCheck

Optional

System.Management.Automation.SwitchParameter

This parameter is reserved for internal Microsoft use.

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 display name for the mail user. The DisplayName is the name that appears in the Exchange Management Console under Recipient Configuration.

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 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 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 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 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.

PrimarySmtpAddress

Optional

Microsoft.Exchange.Data.SmtpAddress

The PrimarySmtpAddress parameter specifies the Reply to address for the mail user. By default, the primary SMTP address is the same as the ExternalEmailAddress parameter value. We recommend that you don't set this parameter unless you're in a cross-forest scenario. If you want to set the primary SMTP address to be a different address from the external e-mail address, you need to set the EmailAddressPolicyEnabled parameter to $false by using the Set-MailUser cmdlet, otherwise the mail user's primary SMTP address will use the ExternalEmailAddress parameter value regardless of the value in the PrimarySmtpAddress parameter.

SKUAssigned

Optional

System.Boolean

This parameter is reserved for internal Microsoft use.

SKUCapability

Optional

Microsoft.Exchange.Data.Directory.Capability

This parameter is reserved for internal Microsoft use.

UsageLocation

Optional

Microsoft.Exchange.Data.Directory.CountryInfo

This parameter is reserved for internal Microsoft use.

UsePreferMessageFormat

Optional

System.Boolean

The UsePreferMessageFormat parameter specifies whether the message format settings configured for the mailbox 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.

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.

Input Types

To see the input types that this cmdlet accepts, see Cmdlet Input and Output Types. If the Input Type field for a cmdlet is blank, the cmdlet doesn’t accept input data.

Return Types

To see the return types, which are also known as output types, that this cmdlet accepts, see Cmdlet Input and Output Types. If the Output Type field is blank, the cmdlet doesn’t return data.

Examples

EXAMPLE 1

This example mail-enables user John with the external e-mail address john@contoso.com.

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