Set-MailUser (RTM)

 

適用版本: Exchange Server 2007

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

使用 Set-MailUser 指令程式修改 Active Directory 目錄服務中現有使用者的郵件相關屬性。

語法

set-MailUser -Identity <MailUserIdParameter> [-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>] [-MaxSendSize <Unlimited>] [-MessageBodyFormat <Text | Html | TextAndHtml>] [-MessageFormat <Text | Mime>] [-Name <String>] [-PrimarySmtpAddress <SmtpAddress>] [-RecipientLimits <Unlimited>] [-RejectMessagesFrom <RecipientIdParameter[]>] [-RejectMessagesFromDLMembers <RecipientIdParameter[]>] [-RequireSenderAuthenticationEnabled <$true | $false>] [-SamAccountName <String>] [-SecondaryAddress <String>] [-SecondaryDialPlan <UMDialPlanIdParameter>] [-SimpleDisplayName <String>] [-UMDtmfMap <MultiValuedProperty>] [-UseMapiRichTextFormat <Never | Always | UseDefaultSettings>] [-UsePreferMessageFormat <$true | $false>] [-UserPrincipalName <String>] [-WindowsEmailAddress <SmtpAddress>]

set-MailUser [-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 <MailUser>] [-MacAttachmentFormat <BinHex | UuEncode | AppleSingle | AppleDouble>] [-MaxReceiveSize <Unlimited>] [-MaxSendSize <Unlimited>] [-MessageBodyFormat <Text | Html | TextAndHtml>] [-MessageFormat <Text | Mime>] [-Name <String>] [-PrimarySmtpAddress <SmtpAddress>] [-RecipientLimits <Unlimited>] [-RejectMessagesFrom <RecipientIdParameter[]>] [-RejectMessagesFromDLMembers <RecipientIdParameter[]>] [-RequireSenderAuthenticationEnabled <$true | $false>] [-SamAccountName <String>] [-SecondaryAddress <String>] [-SecondaryDialPlan <UMDialPlanIdParameter>] [-SimpleDisplayName <String>] [-UMDtmfMap <MultiValuedProperty>] [-UseMapiRichTextFormat <Never | Always | UseDefaultSettings>] [-UsePreferMessageFormat <$true | $false>] [-UserPrincipalName <String>] [-WindowsEmailAddress <SmtpAddress>]

詳細描述

使用 Set-MailUser 指令程式可修改 Active Directory 中擁有郵件功能之使用者的相關郵件屬性。

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

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

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

note附註:
並非所有使用者屬性都可以使用 Set-MailUser 指令程式修改。您可以使用 Set-User 指令程式來設定與郵件無關的其他使用者屬性。

參數

參數 必要 類型 描述

Identity

必要

Microsoft.Exchange.Configuration.Tasks.MailUserIdParameter

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

  • ADObjectID

  • GUID

  • 辨別名稱 (DN)

  • 網域\Sam 帳戶名稱

  • 使用者主要名稱 (UPN)

  • 傳統 DN

  • 電子郵件地址

  • 使用者別名

  • 如果指定 Instance 參數,則無法使用 Identity 參數。

AcceptMessagesOnlyFrom

選用

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

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

  • 辨別名稱 (DN)

  • 標準名稱

  • GUID

  • 名稱

  • 顯示名稱

  • 別名

  • Legacy Exchange DN

  • 主要的簡易郵件傳送通訊協定 (SMTP) 電子郵件地址

此參數預設是空白的。此預設值可讓信箱使用者接受來自所有收件者的郵件。

AcceptMessagesOnlyFromDLMembers

選用

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

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

  • 辨別名稱 (DN)

  • 標準名稱

  • GUID

  • 名稱

  • 顯示名稱

  • Legacy 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 參數可指定是否要依據定義的電子郵件地址原則來自動更新信箱的電子郵件地址。將此參數設為 $true 時,您無法變更 PrimarySmtpAddressWindowsEmailAddress 參數。

Extensions

選用

Microsoft.Exchange.Data.MultiValuedProperty

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

ExternalEmailAddress

選用

Microsoft.Exchange.Data.ProxyAddress

ExternalEmailAddress 參數會指定組織外部的電子郵件地址。會將傳給使用者的電子郵件傳到此外部位址。

GrantSendOnBehalfTo

選用

Microsoft.Exchange.Configuration.Tasks.MailboxOrMailUserIdParameter[]

GrantSendOnBehalfTo 參數可指定可代表此使用者傳送郵件之收件者的辨別名稱 (DN)。

HiddenFromAddressListsEnabled

選用

System.Boolean

HiddenFromAddressListsEnabled 參數可指定使用者是否要出現在通訊清單。預設值為 $false。

Instance

選用

Microsoft.Exchange.Data.Directory.Management.MailUser

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。

如果未指定,則不會有大小限制。

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 位址。

RecipientLimits

選用

Microsoft.Exchange.Data.Unlimited

RecipientLimits 參數可指定來自此使用者的郵件收件者數量上限。

RejectMessagesFrom

選用

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

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

RejectMessagesFromDLMembers

選用

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter[]

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

RequireSenderAuthenticationEnabled

選用

System.Boolean

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

SamAccountName

選用

System.String

SamAccountName 參數定義用於支援執行舊版作業系統 (例如 Microsoft Windows NT 4.0、Windows 98、Windows 95 及 LAN Manager) 之用戶端與伺服器的登入名稱。此屬性必須包含少於 20 個字元。帳戶名稱可包含字母、數字和下列標點符號和符號:

  • !

  • #

  • $

  • %

  • ^

  • &

  • -

  • .

  • _

  • {

  • }

  • |

  • ~

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,以郵件使用者所設定的郵件格式設定覆寫任何全域設定。

UserPrincipalName

選用

System.String

UserPrincipalName 參數可指定使用者的使用者主要名稱 (UPN)。

WindowsEmailAddress

選用

Microsoft.Exchange.Data.SmtpAddress

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

輸入類型

傳回類型

錯誤

錯誤 描述

 

例外狀況

例外狀況 描述

 

範例

在此範例中,Set-MailUser 命令可設定組織外部的電子郵件地址,該組織會接收擁有郵件功能的使用者 John People 所傳送的電子郵件。

Set-MailUser john -ExternalEmailAddress john@tailspintoys.com