Walkthrough Lite: Enabling a User for Microsoft Lync Server 2010 and Enterprise Voice


Walkthrough Lite

 

Enabling a User for Microsoft Lync Server 2010 and Enterprise Voice: A “Barebones” Lync Server Walkthrough

 

The following “barebones” walkthrough shows you how you can use Windows PowerShell to enable a user for both Microsoft Lync Server 2010 and for Enterprise Voice. This walkthrough is called “barebones” because it simply shows you the commands without explaining how those commands work. If you’d like a more detailed explanation, take a look at our comprehensive walkthrough on the same subject.

 

Step 1: Starting the Lync Server Management Shell

 

To start the Lync Server Management Shell, log on to a computer where the Management Shell has been installed; be sure that you log on using an account that has administrative rights to both Lync Server and the local computer. After logging on, complete the following procedure:

 

·         Click Start, click All Programs, click Microsoft Lync Server 2010, and then click Lync Server Management Shell.

 

 

Step 2: Locating a User Account

 

In Microsoft Lync Server, almost all objects (including user accounts) have an Identity property; the Identity uniquely distinguishes the object from all other objects of the same type (e.g., distinguishes one external access policy from all other external access policies). For user accounts you can use any of the following identifiers to represent a user’s Identity:

 

·         Active Directory display name (e.g., "Ken Myer")

·         SIP address (e.g., "sip:kenmyer@litwareinc.com")

·         User Principal Name (e.g., "kenmyer@litwareinc.com")

·         User’s domain name and logon name, in the format domain_name\logon_name (e.g., litwareinc\kenmyer)

 

To retrieve information about all your Active Directory user accounts (both accounts that have been enabled for Lync Server and accounts that have not been enabled for Lync Server) type the following at the Management Shell prompt and then press ENTER:

 

 

Get-CsAdUser

 

To return a single user account, include the –Identity parameter followed by the user’s identity. For example, to return information for the user who has the display name Ken Myer, type the following at the Management Shell prompt and then press ENTER:

 

Get-CsAdUser –Identity "Ken Myer"

 

You can also use wildcard characters when searching for a specific user account. For example, the wildcard value * Myer* returns all users who have a display name that includes a blank space followed by the string value Myer; this syntax returns such user names as Ken Myer and Ken Myerson. To return all the users who have a display name that includes a blank space followed by the string value Myer, type the following at the Management Shell prompt and then press ENTER:

 

Get-CsAdUser –Identity "* Myer*"

 

 

Step 3: Enabling a User for Microsoft Lync Server and Enterprise Voice

 

After you have verified the Identity for the user to be enabled, you can then enable his or her user account by running the Enable-CsUser cmdlet. To enable Ken Myer’s user account for Lync Server, type the following at the Windows PowerShell prompt and then press ENTER:

 

Enable-CsUser –Identity "Ken Myer" –RegistrarPool atl-cs-001.litwareinc.com –SipAddressType FirstNameLastName –SipDomain litwareinc.com

 

The preceding command enables Ken Myer’s user account, and “homes” that account on the Registrar pool atl-cs-001.litwareinc.com. In addition, the command also assigns Ken the SIP address Ken.Myer@litwareinc.com. Any time you enable a user for Lync Server you must assign them to a Registrar pool and assign them a SIP address.

 

After Ken Myer has been enabled for Lync Server you can then use Set-CsUser to enable Ken for Enterprise Voice and to assign him a line URI. To carry out these two tasks, type the following at the Management Shell prompt and then press ENTER:

 

Set-CsUser –Identity "Ken Myer" –EnterpriseVoiceEnabled $True –LineUri "TEL:+14255551298"

 

Alternatively, you can enable Ken both for Lync Server and for Enterprise Voice in a single command. To do this you must:

 

1.    Run Enable-CsUser and include the –PassThru parameter. The –PassThru parameter ensures Enable-CsUser will enable the user account and then pass the user object over the Windows PowerShell pipeline. By default, Enable-CsUser does not pass objects over the pipeline.

2.    Run Set-CsUser on the other side of the pipeline in order to enable the user for Enterprise Voice and to assign him or her a line URI.

 

To enable a user for both Lync Server and Enterprise Voice with a single command, type the following at the Management Shell prompt and then press ENTER:

 

Enable-CsUser –Identity "Ken Myer" –RegistrarPool atl-cs-001.litwareinc.com –SipAddressType FirstNameLastName –SipDomain litwareinc.com –PassThru | Set-CsUser –EnterpriseVoiceEnabled $True –LineUri "TEL:+14255551298"

 

Step 4: Assigning a Dial Plan and a Voice Policy

 

Before users can actually take advantage of Enterprise Voice they must be assigned a valid dial plan and a valid voice policy. For the purposes of this walkthrough, we’ll assume that you or another administrator have already created a per-user dial plan (RedmondDialPlan) and a per-user voice policy (RedmondVoicePolicy). To assign the dial plan to Ken Myer, type the following at the Management Shell prompt and then press ENTER:

 

Grant-CsDialPlan –Identity "Ken Myer" –PolicyName "RedmondDialPlan"

 

To assign the voice policy to Ken Myer, type the following at the Management Shell prompt and then press ENTER:

 

Grant-CsVoicePolicy –Identity "Ken Myer" –PolicyName "RedmondVoicePolicy"

 

Alternatively, you can run a single command that does the following:

 

·         Enables Ken Myer’s user accounts for Lync Server.

·         Enables Ken Myer for Enterprise Voice and assigns him a line URI.

·         Assigns Ken the per-user dial plan RedmondDialPlan.

·         Assigns Ken the per-user voice policy RedmondVoicePolicy.

 

To do all of that, type the following at the Management Shell prompt and then press ENTER:

 

Enable-CsUser –Identity "Ken Myer" –RegistrarPool atl-cs-001.litwareinc.com –SipAddressType FirstNameLastName –SipDomain litwareinc.com –PassThru | Set-CsUser –EnterpriseVoiceEnabled $True –LineUri "TEL:+14255551298" –PassThru | Grant-CsDialPlan –PolicyName "RedmondDialPlan" –PassThru | Grant-CsVoicePolicy –PolicyName "RedmondVoicePolicy"

 

Note that the –PassThru parameter is used throughout this command in order to ensure that Ken’s user account object is passed through the pipeline from one cmdlet to the next.

Comments (5)
  1. Jason Hindson says:

    I just wanted to point out a possible typo in the command switch you have used in the examples. I believe -EnableEnterpriseVoice $True should be -EnterpriseVoiceEnabled $True.

  2. CSPShell says:

    Good catch, thanks! We've gone through and fixed this.

  3. LyncD says:

    Can you please help to make this all work for multiple users, can i have a script to import phone number, samaccountname and voice policy all together in one file for multiple users.?

  4. GW999 says:

    +1 to what LyncD asked for. Everyone with a company of >100 users is going to have to do this with a script. I recall that during OCS 2007/R2 user activation for EV the product would assume the user's primary telephone number was populated in their Telephone Number field under the General tab on the user account properties and would use that value to fill msRTCSIP-line automatically. Lync does not appear to work in the same way – you must explicitly specify the Tel: value even if you have already populated the AD telephone number field for all your users in E.164 format. A script is fine and all but why make everyone create their own? A sample script would help a lot of people.

  5. John Doe says:

    Yes, can I call '1-800-DoMyJob' also?  LOL

Comments are closed.

Skip to main content