Share via


Set-User (RTM)

Microsoft Exchange Server 2007 will reach end of support on April 11, 2017. To stay supported, you will need to upgrade. For more information, see Resources to help you upgrade your Office 2007 servers and clients.

 

Applies to: Exchange Server 2007

Use the Set-User cmdlet to modify user attributes in the Active Directory directory service.

Syntax

set-User -Identity <UserIdParameter> [-AssistantName <String>] [-City <String>] [-Company <String>] [-CountryOrRegion <CountryInfo>] [-CreateDTMFMap <$true | $false>] [-Department <String>] [-DisplayName <String>] [-DomainController <Fqdn>] [-Fax <String>] [-FirstName <String>] [-HomePhone <String>] [-Initials <String>] [-LastName <String>] [-Manager <UserContactIdParameter>] [-MobilePhone <String>] [-Name <String>] [-Notes <String>] [-Office <String>] [-OtherFax <MultiValuedProperty>] [-OtherHomePhone <MultiValuedProperty>] [-OtherTelephone <MultiValuedProperty>] [-Pager <String>] [-Phone <String>] [-PhoneticDisplayName <String>] [-PostalCode <String>] [-PostOfficeBox <MultiValuedProperty>] [-ResetPasswordOnNextLogon <$true | $false>] [-SamAccountName <String>] [-SimpleDisplayName <String>] [-StateOrProvince <String>] [-StreetAddress <String>] [-Title <String>] [-UMDialPlan <UMDialPlanIdParameter>] [-UMDtmfMap <MultiValuedProperty>] [-UserPrincipalName <String>] [-WebPage <String>] [-WindowsEmailAddress <SmtpAddress>]

set-User [-AssistantName <String>] [-City <String>] [-Company <String>] [-CountryOrRegion <CountryInfo>] [-CreateDTMFMap <$true | $false>] [-Department <String>] [-DisplayName <String>] [-DomainController <Fqdn>] [-Fax <String>] [-FirstName <String>] [-HomePhone <String>] [-Initials <String>] [-Instance <User>] [-LastName <String>] [-Manager <UserContactIdParameter>] [-MobilePhone <String>] [-Name <String>] [-Notes <String>] [-Office <String>] [-OtherFax <MultiValuedProperty>] [-OtherHomePhone <MultiValuedProperty>] [-OtherTelephone <MultiValuedProperty>] [-Pager <String>] [-Phone <String>] [-PhoneticDisplayName <String>] [-PostalCode <String>] [-PostOfficeBox <MultiValuedProperty>] [-ResetPasswordOnNextLogon <$true | $false>] [-SamAccountName <String>] [-SimpleDisplayName <String>] [-StateOrProvince <String>] [-StreetAddress <String>] [-Title <String>] [-UMDialPlan <UMDialPlanIdParameter>] [-UMDtmfMap <MultiValuedProperty>] [-UserPrincipalName <String>] [-WebPage <String>] [-WindowsEmailAddress <SmtpAddress>]

Detailed Description

The Set-User cmdlet modifies the attributes of an existing user in Active Directory.

To run the Set-User cmdlet, the account you use must be delegated the following:

  • Exchange Recipient Administrator role

  • Account Operator role for the applicable Active Directory containers

For more information about permissions, delegating roles, and the rights that are required to administer Exchange Server 2007, see Permission Considerations.

Parameters

Parameter Required Type Description

Identity

Required

Microsoft.Exchange.Configuration.Tasks.UserIdParameter

The Identity parameter takes one of the following values:

  • GUID

  • Distinguished name (DN)

  • Domain\Account

  • User principal name (UPN)

  • Legacy Exchange DN

  • Simple Mail Transfer Protocol (SMTP) address

  • Alias

AssistantName

Optional

System.String

The AssistantName parameter defines the user assistant's name.

City

Optional

System.String

The City parameter defines the user's city.

Company

Optional

System.String

The Company parameter defines the user's company.

CountryOrRegion

Optional

Microsoft.Exchange.Data.Directory.CountryInfo

The CountryOrRegion parameter defines the user's country or region.

CreateDTMFMap

Optional

System.Boolean

This parameter specifies that a dual tone multi-frequency (DTMF) map be created for the user.

Department

Optional

System.String

The Department parameter defines the user's department.

DisplayName

Optional

System.String

The DisplayName parameter defines the user's display name.

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.

Fax

Optional

System.String

The Fax parameter defines the user's fax number.

FirstName

Optional

System.String

The FirstName parameter defines the user's given name.

HomePhone

Optional

System.String

The HomePhone parameter defines the user's home telephone number.

Initials

Optional

System.String

The Initials parameter defines the user's initials.

Instance

Optional

Microsoft.Exchange.Data.Directory.Management.User

The Instance parameter enables you to pass an entire object to the command to be processed. It is mainly used in scripts where an entire object must be passed to the command.

LastName

Optional

System.String

The LastName parameter defines the user's surname.

Manager

Optional

Microsoft.Exchange.Configuration.Tasks.UserContactIdParameter

The Manager parameter defines the user's manager.

MobilePhone

Optional

System.String

The MobilePhone parameter defines the user's primary mobile phone number.

Name

Optional

System.String

The Name parameter defines the user's common name.

Notes

Optional

System.String

The Notes parameter defines additional information about the user.

Office

Optional

System.String

The Office parameter defines the user's physical office name or number.

OtherFax

Optional

Microsoft.Exchange.Data.MultiValuedProperty

The OtherFax parameter defines the user's alternative fax number.

OtherHomePhone

Optional

Microsoft.Exchange.Data.MultiValuedProperty

The OtherHomePhone parameter defines the user's alternative home telephone number.

OtherTelephone

Optional

Microsoft.Exchange.Data.MultiValuedProperty

The OtherTelephone parameter defines the user's alternative telephone number.

Pager

Optional

System.String

The Pager parameter defines the user's pager number.

Phone

Optional

System.String

The Phone parameter defines the user's office telephone number.

PhoneticDisplayName

Optional

System.String

The PhoneticDisplayName parameter specifies a phonetic pronunciation of the DisplayName parameter.

The maximum length of this parameter value is 255 characters. For more information about the PhoneticDisplayName parameter and speech recognition, see Understanding Automatic Speech Recognition Directory Lookups.

PostalCode

Optional

System.String

The PostalCode parameter defines the user's zip code or postal code.

PostOfficeBox

Optional

Microsoft.Exchange.Data.MultiValuedProperty

The PostOfficeBox parameter defines the user's post office box number.

ResetPasswordOnNextLogon

Optional

System.Boolean

The ResetPasswordOnNextLogon parameter specifies whether the password specified in the Password parameter must be reset the next time the user logs on. The default value is $true.

SamAccountName

Optional

System.String

The SamAccountName parameter defines the logon name used to support clients and servers running older versions of the operating system, such as Microsoft Windows NT 4.0, Windows 98, Windows 95, and LAN Manager. This attribute must contain fewer than 20 characters.

SimpleDisplayName

Optional

System.String

The SimpleDisplayName parameter is used to display an alternative description of the object when only a limited set of characters is permitted. This limited set of characters consists of ASCII characters 26 through 126, inclusively.

StateOrProvince

Optional

System.String

The StateOrProvince parameter defines the user's state or province.

StreetAddress

Optional

System.String

The StreetAddress parameter defines the user's physical address.

Title

Optional

System.String

The Title parameter defines the user's title.

UMDialPlan

Optional

Microsoft.Exchange.Configuration.Tasks.UMDialPlanIdParameter

This parameter specifies the directory object ID for the dial plan.

UMDtmfMap

Optional

Microsoft.Exchange.Data.MultiValuedProperty

This parameter specifies if you want to create a user-defined DTMF map for the UM-enabled user. 

UserPrincipalName

Optional

System.String

The UserPrincipalName parameter defines the user principal name (UPN) of the user.

WebPage

Optional

System.String

The WebPage parameter defines the user's Web page.

WindowsEmailAddress

Optional

Microsoft.Exchange.Data.SmtpAddress

The WindowsEmailAddress parameter specifies the e-mail address of the recipient.

Input Types

Return Types

Errors

Error Description

  

 

Exceptions

Exceptions Description

  

 

Example

In the following example, the Set-User command is used to set the display name for user Ted Bremer.

Set-User -Identity Contoso\Ted -DisplayName "Ted Bremer"