Enable-MailContact (RTM)

 

適用版本: Exchange Server 2007

上次修改主題的時間: 2010-03-30

您可以使用 Enable-MailContact 命令來啟用 Active Directory 中現有連絡人的郵件功能。

語法

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

詳細描述

此命令會新增 Microsoft Exchange Server 2007 所需的屬性,以啟用 Active Directory 中現有連絡人的郵件功能。啟用連絡人的郵件功能需要有連絡人的識別碼、相關別名及目標電子郵件地址。

若要執行 Enable-MailContact 指令程式,您必須為您所使用的帳戶委派下列角色:

  • Exchange 收件者系統管理員角色

如需管理 Exchange Server 2007 所需之權限、委派角色及權利的相關資訊,請參閱權限考量

參數

參數 必要 類型 描述

Alias

選用

System.String

此參數指定具有郵件功能之連絡人的別名。

ExternalEmailAddress

必要

Microsoft.Exchange.Data.ProxyAddress

此參數指定目標電子郵件地址。根據預設,ExternalEmailAddress 參數中所指定的電子郵件地址會設為 PrimarySMTPAddress。

Identity

必要

Microsoft.Exchange.Configuration.Tasks.ContactIdParameter

此參數會採用下列其中一個值:

  • ADObjectID

  • GUID

  • 辨別名稱

  • 網域\Sam 帳戶名稱

  • 使用者主要名稱 (UPN)

  • LegacyExchangeDN

  • 電子郵件地址

  • 連絡人別名

DisplayName

選用

System.String

此參數指定連絡人的顯示名稱。

DomainController

選用

Microsoft.Exchange.Data.Fqdn

若要指定將此組態變更寫入至 Active Directory 之網域控制站的網域全名,請在命令中加入 DomainController 參數。

MacAttachmentFormat

選用

Microsoft.Exchange.Data.Directory.Recipient.MacAttachmentFormat

MacAttachmentFormat 參數會為傳送給郵件連絡人的郵件指定 Apple Macintosh 作業系統附件格式。此參數的有效值為:

  • BinHex

  • UUENCODE

  • AppleSingle

  • AppleDouble

此參數預設是設為 BinHex。

MacAttachmentFormat 參數的可接受值視 MessageFormat 參數而定。如果 MessageFormat 參數設為 Text,您只能對此參數使用 BinHex 或 UUENCODE 值。如果 MessageFormat 參數設為 MIME,您只能對此參數使用 BinHex、AppleSingle 或 AppleDouble 值。

MessageBodyFormat

選用

Microsoft.Exchange.Data.Directory.Recipient.MessageBodyFormat

MessageBodyFormat 參數會為傳送給郵件連絡人的郵件指定郵件內文格式。此參數的有效值為:

  • Text

  • HTML

  • TextAndHtml

此參數預設是設為 TextAndHtml。

MessageFormatMessageBodyFormat 參數是相互依賴的。如果 MessageFormat 參數設為 MIME,則 MessageBodyFormat 參數可設為任何有效的值。然而,如果 MessageFormat 參數設為 Text,則 MessageBodyFormat 參數只可以設為 Text。因此,如果您想要將此參數設為 Html 或 TextAndHtml,您也必須將 MessageFormat 參數設為 MIME。

MessageFormat

選用

Microsoft.Exchange.Data.Directory.Recipient.MessageFormat

MessageFormat 參數會為傳送給郵件連絡人的郵件指定郵件格式。

此參數的有效值為:

  • Text

  • MIME

此參數預設是設為 MIME。

MessageFormatMessageBodyFormat 參數是相互依賴的。如果 MessageFormat 參數設為 MIME,則 MessageBodyFormat 參數可設為任何有效值。然而,如果 MessageFormat 參數設為 Text,則 MessageBodyFormat 參數只可以設為 Text。因此,如果您想要將 MessageFormat 參數從 MIME 變更為 Text,您也必須將 MessageBodyFormat 參數變更為 Text。

UsePreferMessageFormat

選用

System.Boolean

設為 true 時,這個參數可指定收件者慣用的郵件格式設定,使其覆寫傳送至此使用者之郵件的全域設定。

輸入類型

傳回類型

錯誤

錯誤 描述

 

例外狀況

例外狀況 描述

 

範例

在此範例中,Enable-MailContact 命令用於啟用 Active Directory 中現有連絡人的郵件功能,並且為連絡人提供外部電子郵件地址 "ted@tailspintoys.com"。

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

請注意,Enable-MailContact 命令無法在 Active Directory 中建立新連絡人。使用 New-MailContact 命令建立新連絡人。