Applies to: Exchange Server 2013, Exchange Online

Topic Last Modified: 2013-01-03

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

For information about the parameter sets in the Syntax section below, see Syntax.

Syntax

Set-User -Identity <UserIdParameter> [-AllowUMCallsFromNonUsers <None | SearchEnabled>] [-Arbitration <SwitchParameter>] [-ArchiveRelease <None | E14 | E15>] [-AssistantName <String>] [-BusinessNetID <NetID>] [-CertificateSubject <MultiValuedProperty>] [-City <String>] [-Company <String>] [-Confirm [<SwitchParameter>]] [-CopyShadowAttributes <SwitchParameter>] [-CountryOrRegion <CountryInfo>] [-CreateDTMFMap <$true | $false>] [-Department <String>] [-DisplayName <String>] [-DomainController <Fqdn>] [-EnableAccount <SwitchParameter>] [-Fax <String>] [-FirstName <String>] [-GenerateExternalDirectoryObjectId <SwitchParameter>] [-GeoCoordinates <GeoCoordinates>] [-HomePhone <String>] [-IgnoreDefaultScope <SwitchParameter>] [-Initials <String>] [-InPlaceHoldsRaw <MultiValuedProperty>] [-LastName <String>] [-LinkedCredential <PSCredential>] [-LinkedDomainController <String>] [-LinkedMasterAccount <UserIdParameter>] [-MailboxRelease <None | E14 | E15>] [-Manager <UserContactIdParameter>] [-MicrosoftOnlineServicesID <SmtpAddress>] [-MobilePhone <String>] [-Name <String>] [-NetID <NetID>] [-Notes <String>] [-Office <String>] [-OtherFax <MultiValuedProperty>] [-OtherHomePhone <MultiValuedProperty>] [-OtherTelephone <MultiValuedProperty>] [-Pager <String>] [-Phone <String>] [-PhoneticDisplayName <String>] [-PostalCode <String>] [-PostOfficeBox <MultiValuedProperty>] [-PublicFolder <SwitchParameter>] [-RemotePowerShellEnabled <$true | $false>] [-ResetPasswordOnNextLogon <$true | $false>] [-SamAccountName <String>] [-SeniorityIndex <Int32>] [-SimpleDisplayName <String>] [-SKUAssigned <$true | $false>] [-StateOrProvince <String>] [-StreetAddress <String>] [-TelephoneAssistant <String>] [-Title <String>] [-UMCallingLineIds <MultiValuedProperty>] [-UMDtmfMap <MultiValuedProperty>] [-UpgradeDetails <String>] [-UpgradeMessage <String>] [-UpgradeRequest <None | TenantUpgrade | PrestageUpgrade | CancelPrestageUpgrade | PilotUpgrade | TenantUpgradeDryRun>] [-UpgradeStatus <None | NotStarted | InProgress | Warning | Error | Cancelled | Complete | ForceComplete>] [-UserPrincipalName <String>] [-WebPage <String>] [-WhatIf [<SwitchParameter>]] [-WindowsEmailAddress <SmtpAddress>] [-WindowsLiveID <SmtpAddress>]

Examples

EXAMPLE 1

This example sets the display name for user Jill Frank.

Copy Code
Set-User -Identity Contoso\Jill -DisplayName "Jill Frank" 

EXAMPLE 2

This example unlinks the linked mailbox Kweku@fabrikam.com and converts it to a user mailbox by setting the LinkedMasterAccount parameter to $null.

Important:
Performing this procedure on a linked mailbox removes all permissions on the mailbox such as Send As, Full Access, folder, and calendar delegation.
Copy Code
Set-User -Identity Kweku@fabrikam.com -LinkedMasterAccount $null

Detailed Description

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 Recipients Permissions topic.

Parameters

Parameter Required Type Description

Identity

Required

Microsoft.Exchange.Configuration.Tasks.UserIdParameter

The Identity parameter specifies the identity of the user.

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

AllowUMCallsFromNonUsers

Optional

Microsoft.Exchange.Data.Directory.Recipient.AllowUMCallsFromNonUsersFlags

The AllowUMCallsFromNonUsers parameter specifies whether to exclude the user from directory searches.

Arbitration

Optional

System.Management.Automation.SwitchParameter

The Arbitration parameter specifies that the mailbox for which you are executing the command is an arbitration mailbox. Arbitration mailboxes are used for managing approval workflow. For example, an arbitration mailbox is used for handling moderated recipients and distribution group membership approval.

ArchiveRelease

Optional

Microsoft.Exchange.Data.Directory.SystemConfiguration.MailboxRelease

This parameter is reserved for internal Microsoft use.

AssistantName

Optional

System.String

The AssistantName parameter specifies the name of the user's assistant.

BusinessNetID

Optional

Microsoft.Exchange.Data.NetID

This parameter is reserved for internal Microsoft use.

CertificateSubject

Optional

Microsoft.Exchange.Data.MultiValuedProperty

The CertificateSubject parameter specifies the value of the subject field of the user's digital certificate.

City

Optional

System.String

The City parameter specifies the user's city.

Company

Optional

System.String

The Company parameter specifies the user's company.

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.

CopyShadowAttributes

Optional

System.Management.Automation.SwitchParameter

This parameter is reserved for internal Microsoft use.

CountryOrRegion

Optional

Microsoft.Exchange.Data.Directory.CountryInfo

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

CreateDTMFMap

Optional

System.Boolean

The CreateDTMFMap parameter specifies that a dual-tone multiple-frequency (DTMF) map be created for the user.

Department

Optional

System.String

The Department parameter specifies the user's department.

DisplayName

Optional

System.String

The DisplayName parameter specifies the user's display name.

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.

EnableAccount

Optional

System.Management.Automation.SwitchParameter

This parameter is reserved for internal Microsoft use.

Fax

Optional

System.String

The Fax parameter specifies the user's fax number.

FirstName

Optional

System.String

The FirstName parameter specifies the user's given name.

GenerateExternalDirectoryObjectId

Optional

System.Management.Automation.SwitchParameter

This parameter is reserved for internal Microsoft use.

GeoCoordinates

Optional

Microsoft.Exchange.Data.GeoCoordinates

The GeoCoordinates parameter specifies the user's physical location in latitude, longitude, and altitude coordinates. Use this parameter to specify the global position of physical resources, such as conference rooms. You have to specify one of the following sets of coordinates; use semicolons to separate the values.

  • Latitude and longitude; for example, "47.644125;-122.122411"

  • Latitude, longitude, and altitude; for example, "47.644125;-122.122411;161.432"

HomePhone

Optional

System.String

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

IgnoreDefaultScope

Optional

System.Management.Automation.SwitchParameter

The IgnoreDefaultScope parameter instructs the command to ignore the default recipient scope setting for the Exchange Management Shell session and use the entire forest as the scope. This allows the command to access Active Directory objects that aren't currently in the default scope. Using the IgnoreDefaultScope parameter introduces the following restrictions:

  • You can't use the DomainController parameter. The command uses an appropriate global catalog server automatically.

  • You can only use the DN for the Identity parameter. Other forms of identification, such as alias or GUID, aren't accepted.

Initials

Optional

System.String

The Initials parameter specifies the user's initials.

InPlaceHoldsRaw

Optional

Microsoft.Exchange.Data.MultiValuedProperty

This parameter is reserved for internal Microsoft use.

LastName

Optional

System.String

The LastName parameter specifies the user's surname.

LinkedCredential

Optional

System.Management.Automation.PSCredential

The LinkedCredential parameter specifies credentials to use to access the domain controller specified by the LinkedDomainController parameter.

You can only use the LinkedCredential parameter with a linked user.

This parameter requires the creation and passing of a credential object. This credential object is created by using the Get-Credential cmdlet. For more information, see Get-Credential.

LinkedDomainController

Optional

System.String

The LinkedDomainController parameter specifies the domain controller in the forest where the user account resides, if this user is a linked user. The domain controller in the forest where the user account resides is used to get security information for the account specified by the LinkedMasterAccount parameter.

This parameter is required only if you're connecting a linked user.

LinkedMasterAccount

Optional

Microsoft.Exchange.Configuration.Tasks.UserIdParameter

The LinkedMasterAccount parameter specifies the master account in the forest where the user account resides, if this user is a linked user. The master account is the account to which the user links. The master account grants access to the user. You can use one of the following values:

  • GUID

  • DN

  • Domain\Account

  • UPN

  • LegacyExchangeDN

  • SmtpAddress

  • Alias

  • $null

If you set this parameter's value to $null, you will unlink the account and convert the linked mailbox into a non-linked user mailbox. The mailbox won't retain the permissions previously set on it such as Send As, full access, folder, and calendar delegation.

This parameter is required only if you're connecting a linked user.

MailboxRelease

Optional

Microsoft.Exchange.Data.Directory.SystemConfiguration.MailboxRelease

This parameter is reserved for internal Microsoft use.

Manager

Optional

Microsoft.Exchange.Configuration.Tasks.UserContactIdParameter

The Manager parameter specifies the user's manager.

MicrosoftOnlineServicesID

Optional

Microsoft.Exchange.Data.SmtpAddress

The MicrosoftOnlineServicesID parameter specifies the user ID for the object. This parameter only applies to objects in the cloud-based service. It isn’t available for on-premises deployments.

MobilePhone

Optional

System.String

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

Name

Optional

System.String

The Name parameter specifies the user's common name.

NetID

Optional

Microsoft.Exchange.Data.NetID

This parameter is reserved for internal Microsoft use.

Notes

Optional

System.String

The Notes parameter specifies additional information about the user.

Office

Optional

System.String

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

OtherFax

Optional

Microsoft.Exchange.Data.MultiValuedProperty

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

OtherHomePhone

Optional

Microsoft.Exchange.Data.MultiValuedProperty

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

OtherTelephone

Optional

Microsoft.Exchange.Data.MultiValuedProperty

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

Pager

Optional

System.String

The Pager parameter specifies the user's pager number.

Phone

Optional

System.String

The Phone parameter specifies 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.

PostalCode

Optional

System.String

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

PostOfficeBox

Optional

Microsoft.Exchange.Data.MultiValuedProperty

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

PublicFolder

Optional

System.Management.Automation.SwitchParameter

The PublicFolder parameter specifies that the user for which you're executing the command is a public folder mailbox. Public folder mailboxes are specially designed mailboxes to store the hierarchy and content of public folders. This parameter is required to change the settings for a public folder mailbox.

RemotePowerShellEnabled

Optional

System.Boolean

The RemotePowerShellEnabled parameter specifies whether the user can use remote PowerShell. remote PowerShell is required to open the Exchange Management Shell or the Exchange Administration Center. Access to remote PowerShell is required even if you're trying to open the Shell or the Exchange Administration Center on the local server.

The valid values are $true and $false. The default value depends on the management roles assigned to the user.

ResetPasswordOnNextLogon

Optional

System.Boolean

The ResetPasswordOnNextLogon parameter specifies whether the user's password must be reset the next time the user logs on. The two possible values for this parameter are $true or $false. The default value is $true.

SamAccountName

Optional

System.String

The SamAccountName parameter specifies 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.

SeniorityIndex

Optional

System.Int32

The SeniorityIndex parameter specifies the order in which this user will display in a hierarchical address book. A user with a value of 2 will display higher in an address book than a user with a value of 1.

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.

SKUAssigned

Optional

System.Boolean

This parameter is reserved for internal Microsoft use.

StateOrProvince

Optional

System.String

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

StreetAddress

Optional

System.String

The StreetAddress parameter specifies the user's physical address.

TelephoneAssistant

Optional

System.String

The TelephoneAssistant parameter specifies the telephone number of the user's assistant.

Title

Optional

System.String

The Title parameter specifies the user's title.

UMCallingLineIds

Optional

Microsoft.Exchange.Data.MultiValuedProperty

The UMCallingLineIds parameter specifies telephone numbers or extensions that can be mapped to a Unified Messaging (UM)-enabled user. You can specify more than one telephone number for each user, separated by a comma. This parameter accepts digits less than 128 characters in length and may include an optional plus sign (+) preceding the numbers. Each UM-enabled user must have a unique UMCallingLineIds parameter value.

UMDtmfMap

Optional

Microsoft.Exchange.Data.MultiValuedProperty

The UMDtmfMap parameter specifies whether you want to create a user-defined DTMF map for the UM-enabled user.

UpgradeDetails

Optional

System.String

This parameter is reserved for internal Microsoft use.

UpgradeMessage

Optional

System.String

This parameter is reserved for internal Microsoft use.

UpgradeRequest

Optional

Microsoft.Exchange.Data.Directory.SystemConfiguration.UpgradeRequestTypes

This parameter is reserved for internal Microsoft use.

UpgradeStatus

Optional

Microsoft.Exchange.Data.Directory.SystemConfiguration.UpgradeStatusTypes

This parameter is reserved for internal Microsoft use.

UserPrincipalName

Optional

System.String

The UserPrincipalName parameter specifies the UPN of the user.

WebPage

Optional

System.String

The WebPage parameter specifies the user's Web page.

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.

WindowsEmailAddress

Optional

Microsoft.Exchange.Data.SmtpAddress

The WindowsEmailAddress parameter specifies the email address of the recipient.

WindowsLiveID

Optional

Microsoft.Exchange.Data.SmtpAddress

This parameter is reserved for internal Microsoft use.

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.