Topic Last Modified: 2010-12-06

Modifies Microsoft Lync Server 2010 properties for an existing user account. Properties can be modified only for accounts that have been enabled for use with Lync Server 2010.

Syntax

Set-CsUser -Identity <UserIdParameter> [-AcpInfo <MultiValuedProperty>] [-AudioVideoDisabled <$true | $false>] [-Confirm [<SwitchParameter>]] [-DomainController <Fqdn>] [-Enabled <$true | $false>] [-EnterpriseVoiceEnabled <$true | $false>] [-HostedVoiceMail <Nullable>] [-LineServerURI <String>] [-LineURI <String>] [-PassThru <SwitchParameter>] [-PrivateLine <String>] [-RemoteCallControlTelephonyEnabled <$true | $false>] [-SipAddress <String>] [-WhatIf [<SwitchParameter>]]

Parameters

Parameter Required Type Description

Identity

Required

XdsIdentity

Indicates the Identity of the user account to be modified. User Identities can be specified using one of four formats: 1) the user's SIP address; 2) the user's user principal name (UPN); 3) the user's domain name and logon name, in the form domain\logon (for example, litwareinc\kenmyer); and, 4) the user's Active Directory display name (for example, Ken Myer). User Identities can also be referenced by using the user’s Active Directory distinguished name.

You can use the asterisk (*) wildcard character when using the display name as the user Identity. For example, the Identity "* Smith" returns all the users who have a display name that ends with the string value " Smith".

ACPInfo

Optional

Array of ACPInfo objects

Enables you to assign one or more third-party audio conferencing providers to a user. However, it is recommended that you use the Set-UserAcp cmdlet to assign Audio conferencing providers.

AudioVideoDisabled

Optional

Boolean

Indicates whether the user is allowed to make audio/visual (A/V) calls by using Lync 2010. If set to True, the user will largely be restricted to sending and receiving instant messages.

You cannot disable A/V communications if a user is currently enabled for remote call control, Enterprise Voice, and/or Internet Protocol private branch exchange (IP-PBX) soft phone routing.

Enabled

Optional

Boolean

Indicates whether or not the user has been enabled for Lync Server. If you set this value to False, the user will no longer be able to log on to Lync Server; setting this value to True re-enables the user's logon privileges.

If you disable an account by using the Enabled parameter, the information associated with that account (including assigned policies and whether or not the user is enabled for Enterprise Voice and/or remote call control) is retained. If you later re-enable the account by using the Enabled parameter, the associated account information will be restored. This differs from using the cmdlet Disable-CsUser to disable a user account. When you run Disable-CsUser, all the Lync Server data associated with that account is deleted.

DomainController

Optional

String

Enables you to specify a domain controller to connect to when modifying a user account. If this parameter is not included then the cmdlet will use the first available domain controller.

EnterpriseVoiceEnabled

Optional

Boolean

Indicates whether the user has been enabled for Enterprise Voice, which is the Microsoft implementation of Voice over Internet Protocol (VoIP). With Enterprise Voice, users can make telephone calls using the Internet rather than using the standard telephone network.

HostedVoiceMail

Optional

Boolean

When set to True, enables a user’s voice mail calls to be routed to a hosted version of Microsoft Exchange Server. In addition, setting this option to True enables Lync 2010 users to directly place a call to another user’s voice mail.

LineURI

Optional

String

Phone number assigned to the user. The line Uniform Resource Identifier (URI) must be specified using the E.164 format and use the "TEL:" prefix. For example: TEL:+14255551297. Any extension number should be added to the end of the line URI, for example: TEL:+14255551297;ext=51297.

It is important to note that Lync Server treats TEL:+14255551297 and TEL:+14255551297;ext=51297 as two different numbers. If you assign Ken Myer the line URI TEL:+14255551297 and later try to assign Pilar Ackerman the line URI TEL:+14255551297;ext=51297, that assignment will succeed; the number assigned to Pilar will not be flagged as a duplicate number. This is due to the fact that, depending on your setup, those two numbers could actually be different. For example, in some organizations dialing 1-425-555-1297 routes your call to an Exchange Auto Attendant. Conversely, dialing just the extension (51297) or using Microsoft Lync 2010 to dial the number 1-425-555-1297 extension 51297 will route your call directly to the user.

LineServerURI

Optional

String

The URI of the remote call control telephone gateway assigned to the user. The LineServerUri is the gateway URI, prefaced by "sip:". For example: sip:rccgateway@litwareinc.com

PrivateLine

Optional

String

Phone number for the user's private telephone line. A private line is a phone number that is not published in Active Directory Domain Services (AD DS) and, as a result, is not readily available to other people. In addition, this private line bypasses most in-bound call routing rules; for example, a call to a private line will not be forwarded to a person's delegates. Private lines are often used for personal phone calls or for business calls that should be kept separate from other team members.

The private line value should be specified using the E.164 format, and be prefixed by the "TEL:" prefix. For example: TEL:+14255551297.

RemoteCallControlTelephonyEnabled

Optional

Boolean

Indicates whether the user has been enabled for remote call control telephony. When enabled for remote call control, a user can employ Lync Server to answer phone calls made to his or her desk phone. Phone calls can also be made using Lync 2010. These calls all rely on the standard telephone network, also known as the public switched telephone network (PSTN). To make and receive phone calls over the Internet, the user must be enabled for Enterprise Voice. For details, see the parameter EnterpriseVoiceEnabled.

To be enabled for remote call control, a user must have both a LineUri and a LineServerUri.

SipAddress

Optional

String

Unique identifier (similar to an email address) that allows the user to communicate using SIP devices such as Lync 2010. The SIP address must use the sip: prefix as well as a valid SIP domain; for example: -SipAddress sip:kenmyer@litwareinc.com.

PassThru

Optional

Switch Parameter

Enables you to pass a user object through the pipeline that represents the user whose account is being modified. By default, the Set-CsUser cmdlet does not pass objects through the pipeline.

WhatIf

Optional

Switch Parameter

Describes what would happen if you executed the command without actually executing the command.

Confirm

Optional

Switch Parameter

Prompts you for confirmation before executing the command.

Detailed Description

Set-CsUser enables you to modify the Lync Server-related user account attributes that are stored in Active Directory Domain Services (AD DS). For example, you can disable or re-enable a user for Lync Server; enable or disable a user for audio/video (A/V) communications; or modify a user’s private line and line URI numbers. Set-CsUser can be used only for users who have been enabled for Lync Server.

The only attributes you can modify using Set-CsUser are attributes related to Lync Server. Other user account attributes, such as the user’s job title or department, cannot be modified by using this cmdlet.

Who can run this cmdlet: By default, members of the following groups are authorized to run the Set-CsUser cmdlet locally: RTCUniversalUserAdmins. To return a list of all the role-based access control (RBAC) roles this cmdlet has been assigned to (including any custom RBAC roles you have created yourself), run the following command from the Windows PowerShell prompt:

Get-CsAdminRole | Where-Object {$_.Cmdlets –match "Set-CsUser\b"}

Input Types

String or Microsoft.Rtc.Management.ADConnect.Schema.ADUser object. Set-CsUser accepts a pipelined string value representing the Identity of a user account that has been enabled for Lync Server. The cmdlet also accepts pipelined instances of the Active Directory user object.

Return Types

Set-CsUser does not return any objects.

Example

-------------------------- Example 1 --------------------------

Copy Code
Set-CsUser -Identity "Pilar Ackerman" -EnterpriseVoiceEnabled $True

In Example 1, Set-CsUser is used to modify the user account with the Identity Pilar Ackerman. In this case, the account is modified to enable Enterprise Voice, the Microsoft implementation of VoIP. This task is carried out by adding the EnterpriseVoiceEnabled parameter, and then setting the parameter value to $True.

-------------------------- Example 2 --------------------------

Copy Code
Get-CsUser -LdapFilter "Department=Finance" | Set-CsUser -EnterpriseVoiceEnabled $True

In Example 2, all the users in the Finance department have their accounts enabled for Enterprise Voice. In this command, the Get-CsUser cmdlet and the LDAPFilter are first used to return a collection of all the users who work in the Finance department. That information is then piped to Set-CsUser, which enables Enterprise Voice for each account in the collection.

See Also