Set-MailContact (RTM)

 

適用版本: Exchange Server 2007

上次修改主題的時間: 2007-06-05

使用 Set-MailContact 指令程式來修改 Active Directory 目錄服務中擁有郵件功能的現有連絡人。

語法

Set-MailContact -Identity <MailContactIdParameter> [-AcceptMessagesOnlyFrom <RecipientIdParameter[]>] [-AcceptMessagesOnlyFromDLMembers <RecipientIdParameter[]>] [-Alias <String>] [-CreateDTMFMap <$true | $false>] [-CustomAttribute1 <String>] [-CustomAttribute10 <String>] [-CustomAttribute11 <String>] [-CustomAttribute12 <String>] [-CustomAttribute13 <String>] [-CustomAttribute14 <String>] [-CustomAttribute15 <String>] [-CustomAttribute2 <String>] [-CustomAttribute3 <String>] [-CustomAttribute4 <String>] [-CustomAttribute5 <String>] [-CustomAttribute6 <String>] [-CustomAttribute7 <String>] [-CustomAttribute8 <String>] [-CustomAttribute9 <String>] [-DisplayName <String>] [-DomainController <Fqdn>] [-EmailAddresses <ProxyAddressCollection>] [-EmailAddressPolicyEnabled <$true | $false>] [-Extensions <MultiValuedProperty>] [-ExternalEmailAddress <ProxyAddress>] [-GrantSendOnBehalfTo <MailboxOrMailUserIdParameter[]>] [-HiddenFromAddressListsEnabled <$true | $false>] [-MacAttachmentFormat <BinHex | UuEncode | AppleSingle | AppleDouble>] [-MaxReceiveSize <Unlimited>] [-MaxRecipientPerMessage <Unlimited>] [-MaxSendSize <Unlimited>] [-MessageBodyFormat <Text | Html | TextAndHtml>] [-MessageFormat <Text | Mime>] [-Name <String>] [-PrimarySmtpAddress <SmtpAddress>] [-RejectMessagesFrom <RecipientIdParameter[]>] [-RejectMessagesFromDLMembers <RecipientIdParameter[]>] [-RequireSenderAuthenticationEnabled <$true | $false>] [-SecondaryAddress <String>] [-SecondaryDialPlan <UMDialPlanIdParameter>] [-SimpleDisplayName <String>] [-UMDtmfMap <MultiValuedProperty>] [-UseMapiRichTextFormat <Never | Always | UseDefaultSettings>] [-UsePreferMessageFormat <$true | $false>] [-WindowsEmailAddress <SmtpAddress>]

Set-MailContact [-AcceptMessagesOnlyFrom <RecipientIdParameter[]>] [-AcceptMessagesOnlyFromDLMembers <RecipientIdParameter[]>] [-Alias <String>] [-CreateDTMFMap <$true | $false>] [-CustomAttribute1 <String>] [-CustomAttribute10 <String>] [-CustomAttribute11 <String>] [-CustomAttribute12 <String>] [-CustomAttribute13 <String>] [-CustomAttribute14 <String>] [-CustomAttribute15 <String>] [-CustomAttribute2 <String>] [-CustomAttribute3 <String>] [-CustomAttribute4 <String>] [-CustomAttribute5 <String>] [-CustomAttribute6 <String>] [-CustomAttribute7 <String>] [-CustomAttribute8 <String>] [-CustomAttribute9 <String>] [-DisplayName <String>] [-DomainController <Fqdn>] [-EmailAddresses <ProxyAddressCollection>] [-EmailAddressPolicyEnabled <$true | $false>] [-Extensions <MultiValuedProperty>] [-ExternalEmailAddress <ProxyAddress>] [-GrantSendOnBehalfTo <MailboxOrMailUserIdParameter[]>] [-HiddenFromAddressListsEnabled <$true | $false>] [-Instance <MailContact>] [-MacAttachmentFormat <BinHex | UuEncode | AppleSingle | AppleDouble>] [-MaxReceiveSize <Unlimited>] [-MaxRecipientPerMessage <Unlimited>] [-MaxSendSize <Unlimited>] [-MessageBodyFormat <Text | Html | TextAndHtml>] [-MessageFormat <Text | Mime>] [-Name <String>] [-PrimarySmtpAddress <SmtpAddress>] [-RejectMessagesFrom <RecipientIdParameter[]>] [-RejectMessagesFromDLMembers <RecipientIdParameter[]>] [-RequireSenderAuthenticationEnabled <$true | $false>] [-SecondaryAddress <String>] [-SecondaryDialPlan <UMDialPlanIdParameter>] [-SimpleDisplayName <String>] [-UMDtmfMap <MultiValuedProperty>] [-UseMapiRichTextFormat <Never | Always | UseDefaultSettings>] [-UsePreferMessageFormat <$true | $false>] [-WindowsEmailAddress <SmtpAddress>]

詳細描述

Set-MailContact 指令程式可藉由指定連絡人身分和要修改的屬性,修改 Active Directory 中擁有郵件功能的現有連絡人。

若要執行 Set-MailContact 指令程式,必須對您使用的帳戶委派下列項目:

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

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

參數

參數 必要 類型 描述

Identity

必要

Microsoft.Exchange.Configuration.Tasks.MailContactIdParameter

Identity 參數使用下列其中一個值:

  • ADObjectID
  • GUID
  • 辨別名稱 (DN)
  • 網域\Sam 帳戶名稱
  • 使用者主要名稱 (UPN)
  • 傳統 DN
  • 電子郵件地址
  • 連絡人別名

AcceptMessagesOnlyFrom

選用

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

AcceptMessagesOnlyFrom 參數可指定可將電子郵件傳給此郵件連絡人的收件者。它可以為有效的寄件者使用下列任何值:

  • 辨別名稱 (DN)
  • 標準名稱
  • GUID
  • 名稱
  • 顯示名稱
  • 別名
  • 傳統 Exchange DN
  • 主要的簡易郵件傳送通訊協定 (SMTP) 電子郵件地址

此參數預設是空白的。此預設值可讓郵件連絡人接受所有收件者的郵件。

AcceptMessagesOnlyFromDLMembers

選用

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

AcceptMessagesOnlyFromDLMembers 參數可指定哪些通訊群組可以將電子郵件傳到此郵件連絡人。您可以為允許的通訊群組使用下列任何值:

  • 辨別名稱 (DN)
  • 標準名稱
  • GUID
  • 名稱
  • 顯示名稱
  • 傳統 Exchange DN
  • 主要 SMTP 電子郵件地址

此參數預設是空白的。

Alias

選用

System.String

Alias 參數可指定擁有郵件功能連絡人的別名。別名可包含字母、數字和下列標點符號和符號:

  • !
  • #
  • $
  • %
  • ^
  • &
  • *
  • +
  • -
  • .
  • /
  • =
  • ?
  • _
  • {
  • }
  • |
  • ~

CreateDTMFMap

選用

System.Boolean

此參數指定為連絡人建立雙音多頻 (DTMF) 對應。

CustomAttribute1

選用

System.String

CustomAttribute1 參數指定自訂的屬性。您可以使用這些屬性來儲存其他資訊。

CustomAttribute10

選用

System.String

CustomAttribute10 參數指定自訂的屬性。您可以使用這些屬性來儲存其他資訊。

CustomAttribute11

選用

System.String

CustomAttribute11 參數指定自訂的屬性。您可以使用這些屬性來儲存其他資訊。

CustomAttribute12

選用

System.String

CustomAttribute12 參數指定自訂的屬性。您可以使用這些屬性來儲存其他資訊。

CustomAttribute13

選用

System.String

CustomAttribute13 參數指定自訂的屬性。您可以使用這些屬性來儲存其他資訊。

CustomAttribute14

選用

System.String

CustomAttribute14 參數指定自訂的屬性。您可以使用這些屬性來儲存其他資訊。

CustomAttribute15

選用

System.String

CustomAttribute15 參數指定自訂的屬性。您可以使用這些屬性來儲存其他資訊。

CustomAttribute2

選用

System.String

CustomAttribute2 參數指定自訂的屬性。您可以使用這些屬性來儲存其他資訊。

CustomAttribute3

選用

System.String

CustomAttribute3 參數指定自訂的屬性。您可以使用這些屬性來儲存其他資訊。

CustomAttribute4

選用

System.String

CustomAttribute4 參數指定自訂的屬性。您可以使用這些屬性來儲存其他資訊。

CustomAttribute5

選用

System.String

CustomAttribute5 參數指定自訂的屬性。您可以使用這些屬性來儲存其他資訊。

CustomAttribute6

選用

System.String

CustomAttribute6 參數指定自訂的屬性。您可以使用這些屬性來儲存其他資訊。

CustomAttribute7

選用

System.String

CustomAttribute7 參數指定自訂的屬性。您可以使用這些屬性來儲存其他資訊。

CustomAttribute8

選用

System.String

CustomAttribute8 參數指定自訂的屬性。您可以使用這些屬性來儲存其他資訊。

CustomAttribute9

選用

System.String

CustomAttribute9 參數指定自訂的屬性。您可以使用這些屬性來儲存其他資訊。

DisplayName

選用

System.String

DisplayName 參數可指定使用者的顯示名稱。

DomainController

選用

Microsoft.Exchange.Data.Fqdn

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

EmailAddresses

選用

Microsoft.Exchange.Data.ProxyAddressCollection

EmailAddresses 參數可指定通訊群組清單 Proxy 電子郵件地址。

EmailAddressPolicyEnabled

選用

System.Boolean

EmailAddressPolicyEnabled 參數可指定是否要依據定義的電子郵件地址原則來自動更新信箱的電子郵件地址。

Extensions

選用

Microsoft.Exchange.Data.MultiValuedProperty

此參數指定連絡人的一或多個分機號碼。設定參數時,撥號對應表內的所有分機號碼都必須是唯一的。

ExternalEmailAddress

選用

Microsoft.Exchange.Data.ProxyAddress

ExternalEmailAddress 參數可指定收件者的外部電子郵件地址。

GrantSendOnBehalfTo

選用

Microsoft.Exchange.Configuration.Tasks.MailboxOrMailUserIdParameter[]

GrantSendOnBehalfTo 參數考指定可代表此連絡人傳送郵件的收件者辨別名稱 (DN)。

HiddenFromAddressListsEnabled

選用

System.Boolean

HiddenFromAddressListsEnabled 參數可指定連絡人是否出現在通訊清單中。若值為 $true,連絡人不會出現在通訊清單中。預設值為 $false。

Instance

選用

Microsoft.Exchange.Data.Directory.Management.MailContact

Instance 參數可讓您將整個物件傳遞至要處理的命令。它主要是用於必須將整個物件傳遞至該命令的指令碼。

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 值。

MaxReceiveSize

選用

Microsoft.Exchange.Data.Unlimited

MaxReceiveSize 參數可指定可接收的電子郵件大小上限 (從 1 KB 到 2,097,151 KB)。

若未指定值,則會將限制設為最大值。

MaxRecipientPerMessage

選用

Microsoft.Exchange.Data.Unlimited

MaxRecipientPerMessage 參數可指定來自此郵件連絡人之郵件的收件者數量上限。

MaxSendSize

選用

Microsoft.Exchange.Data.Unlimited

MaxSendSize 參數可指定可傳送的電子郵件大小上限 (從 1 KB 到 2,097,151 KB)。

若未指定值,則會將限制設為最大值。

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。

Name

選用

System.String

Name 參數可指定擁有郵件功能的連絡人名稱。

PrimarySmtpAddress

選用

Microsoft.Exchange.Data.SmtpAddress

PrimarySmtpAddress 參數可指定主要 SMTP 電子郵件地址。

RejectMessagesFrom

選用

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

RejectMessagesFrom 參數指定收件者要拒絕哪些寄件者的郵件。

RejectMessagesFromDLMembers

選用

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

RejectMessagesFromDLMembers 參數指定通訊群組清單成員要拒絕哪些寄件者的郵件。

RequireSenderAuthenticationEnabled

選用

System.Boolean

RequireSenderAuthenticationEnabled 參數可指定是否僅接受來自驗證過的收件者郵件。預設值為 $false。

SecondaryAddress

選用

System.String

此參數指定已啟用 UM 之連絡人所使用的次要地址。

SecondaryDialPlan

選用

Microsoft.Exchange.Configuration.Tasks.UMDialPlanIdParameter

此參數指定要使用的次要 UM 撥號對應表。提供此參數可建立次要 Proxy 位址。

SimpleDisplayName

選用

System.String

SimpleDisplayName 參數是在只允許有限的一組字元時,用來顯示物件的替代性描述。這組有限的字元是由 ASCII 字元 26 到 126 所組成。

UMDtmfMap

選用

Microsoft.Exchange.Data.MultiValuedProperty

此參數指定是否要為已啟用 UM 的連絡人建立使用者定義之 DTMF 對應。

UseMapiRichTextFormat

選用

Microsoft.Exchange.Data.Directory.Recipient.UseMapiRichTextFormat

UseMapiRichTextFormat 參數可指定為此郵件連絡人處理 MAPI RTF 格式 (RTF) 郵件的方式。將此參數設為 Never,可將傳送給此連絡人的所有郵件轉換成純文字。將此參數設為 Always,則一律會以 MAPI RTF 將郵件傳給此連絡人。將此參數設為 UseDefaultSettings,根據傳送郵件的 MAPI 用戶端設定來決定格式。

UsePreferMessageFormat

選用

System.Boolean

UsePreferMessageFormat 參數可指定是否以郵件連絡人所設定的郵件格式設定,覆寫為遠端網域所設定的全域設定。將此參數設為 $true,以郵件連絡人所設定的郵件格式設定覆寫任何全域設定。

WindowsEmailAddress

選用

Microsoft.Exchange.Data.SmtpAddress

WindowsEmailAddress 參數指定此信箱的 Windows 電子郵件地址。此位址不會由 Exchange 使用。

輸入類型

傳回類型

錯誤

錯誤 描述

 

例外狀況

例外狀況 描述

 

範例

在本範例中,Set-MailContact 命令可將 John Peoples 的外部電子郵件地址設為 john@contoso.com。

Set-MailContact -Identity "John Peoples" -ExternalEmailAddress "john@contoso.com"

若要確保您目前閱讀的是最新資訊,並尋找其他的 Exchange Server 2007 說明文件,請造訪 Exchange Server 技術資源中心.