Applies to: Exchange Server 2010 SP3, Exchange Server 2010 SP2
Topic Last Modified: 2012-11-16
Use the Set-User cmdlet to modify user attributes in Active Directory.
Syntax
Set-User -Identity <UserIdParameter>
[-AllowUMCallsFromNonUsers <None | SearchEnabled>]
[-Arbitration <SwitchParameter>] [-AssistantName
<String>] [-CertificateSubject <MultiValuedProperty>]
[-City <String>] [-Company <String>] [-Confirm
[<SwitchParameter>]] [-CountryOrRegion <CountryInfo>]
[-CreateDTMFMap <$true | $false>] [-Department
<String>] [-DisplayName <String>] [-DomainController
<Fqdn>] [-EnableAccount <SwitchParameter>] [-Fax
<String>] [-FirstName <String>] [-HomePhone
<String>] [-IgnoreDefaultScope <SwitchParameter>]
[-Initials <String>] [-LastName <String>]
[-LinkedCredential <PSCredential>] [-LinkedDomainController
<String>] [-LinkedMasterAccount <UserIdParameter>]
[-Manager <UserContactIdParameter>] [-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>]
[-RemotePowerShellEnabled <$true | $false>]
[-ResetPasswordOnNextLogon <$true | $false>] [-SamAccountName
<String>] [-SeniorityIndex <Int32>] [-SimpleDisplayName
<String>] [-StateOrProvince <String>] [-StreetAddress
<String>] [-TelephoneAssistant <String>] [-Title
<String>] [-UMCallingLineIds <MultiValuedProperty>]
[-UMDtmfMap <MultiValuedProperty>] [-UserPrincipalName
<String>] [-WebPage <String>] [-WhatIf
[<SwitchParameter>]] [-WindowsEmailAddress
<SmtpAddress>] [-WindowsLiveID <SmtpAddress>]
|
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 Mailbox 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:
|
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. |
AssistantName |
Optional |
System.String |
The AssistantName parameter specifies the name of the user's assistant. |
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. |
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. |
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:
|
Initials |
Optional |
System.String |
The Initials parameter specifies the user's initials. |
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:
If you set this parameter’s value to This parameter is required only if you're connecting a linked user. |
Manager |
Optional |
Microsoft.Exchange.Configuration.Tasks.UserContactIdParameter |
The Manager parameter specifies the user's manager. |
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. For more information about the PhoneticDisplayName parameter and speech recognition, see Understanding Automatic Speech Recognition Directory Lookups. |
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. |
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 Management Console on Mailbox, Hub Transport, Unified Messaging, and Client Access servers. Access to Remote PowerShell is required even if you're trying to open the Shell or the console on the local server. The valid values are |
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 |
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. |
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. |
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 e-mail 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.
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 |