Freigeben über


Lync Server Admin Guide: Managing Users

This article is part of the Microsoft Lync Server 2010 Administration Guide: PowerShell Supplement.

Search for Lync Server 2010 Users

  • To search for one or more users

To search for a user based on the value of a Microsoft Lync Server-specific attribute, use the Get-CsUser cmdlet and the Filter parameter. For example, this command searches for all users who have not been assigned a per-user voice policy:

Get-CsUser -Filter {VoicePolicy -eq $Null}

 

To search for a user based on the value of a generic Active Directory attribute, use the Get-CsUser cmdlet and the LdapFilter parameter. For example, this command searches for all users who are members of the Finance department:

 

Get-CsUser -LDAPFilter "Department=Finance"

 

For more information:

 

 

 

Add a New User to Lync Server 2010

  • To create a new Lync Server user

To enable a user to use Lync Server, use the Enable-CsUser cmdlet:

Enable-CsUser -Identity "Pilar Ackerman" -RegistrarPool "atl-cs-001.litwareinc.com" -SipAddressType SamAccountName -SipDomain litwareinc.com

 

The preceding command includes the SipAddressType and SipDomain parameters; this causes Lync Server to automatically create a SIP address for the user based (in this case) on the user's SamAccountName and the domain name litwareinc.com. Alternatively, you can use the SipAddress parameter to assign a specific SIP address to a user:

 

Enable-CsUser -Identity "Pilar Ackerman" -RegistrarPool "atl-cs-001.litwareinc.com" –SipAddress "sip:pilar@litwareinc.com"

 

 

For more information

 

 

 

Enable or Disable Users for Lync Server 2010

  • To disable or re-enable a previously enabled user account for Lync Server

To permanently disable a Lync Server user account, use the Disable-CsUser cmdlet:

 

Disable-CsUser –Identity "Ken Myer"

 

When you run the preceding command, the user's Lync account will be disabled and all Lync Server-related attributes (including the policies assigned to that user) will be deleted from the user account. (Note that the user's Active Directory user account will not be deleted.) If you later decide to once more give the user access to Lync Server you will need to re-run the Enable-CsUser cmdlet, reassign any per-user policies, and reset property values such as the user's line URI and SIP address.

 

To temporarily disable a Lync Server user account, use the Set-CsUser cmdlet to set the account's Enabled property to False:

 

Set-CsUser –Identity "Ken Myer" –Enabled $False

 

When you run the preceding command the user will still have a valid Lync Server account, and that account will retain all its current settings (including any per-user policies that have been assigned to the user). However, the user will not be able to log on to Lync Server until his or her account has been re-enabled.

 

To re-enable a user whose Lync Server account has been temporarily disabled, use the Set-CsUser cmdlet to set the account's Enabled property to True:

Set-CsUser –Identity "Ken Myer" –Enabled $True

 

For more information:

 

Set, View, and Send a User's Dial-in Conferencing PIN

  • To set a user’s PIN

Lync Server PowerShell provides two different ways to assign a PIN number to a user. To have Lync Server randomly generate a PIN number for the user, use a command similar to this one:

 

Set-CsClientPin -Identity "Ken Myer"

 

The assigned PIN number will appear onscreen, like this:

 

Identity Pin PinReset

-------- --- --------

Sip:kmyer@litwareince.com 55279 True

 

Note. It will be up to you to notify the user of his or her new PIN number; Lync Server will not automatically send these notifications for you.

 

Alternatively, you can include the Pin parameter and assign a specific PIN number to a user:

 

Set-CsClientPin -Identity "Ken Myer" -Pin 18723834

 

You can also pipe multiple user accounts to Set-CsClientPin and Lync Server will automatically assign a new PIN number to each of those accounts. For example:

 

Get-CsUser –LdapFilter "Department=IT" | Set-CsClientPin

 

For more information:

Move Users to Another Pool

  • To move selected users to a different server or pool

To move a user from one Registrar pool to another, use the Move-CsUser cmdlet:

Move-CsUser -Identity "Pilar Ackerman" -Target "atl-cs-001.litwareinc.com"

 

You can also move multiple users by piping more than one user Identity (in this case, the Active Directory display name) to the Move-CsUser cmdlet:

 

"Ken Myer", "Pilar Ackerman", "Aidan Delaney" | Move-CsUser -Target "atl-cs-001.litwareinc.com"

 

 

  • To move all users from one server or pool to a different server or pool

To move all the users from a specified pool to a different pool, first use the Get-CsUser cmdlet to retrieve all the users from that pool; in the following command, the Filter value {RegistrarPool –eq "dublin-cs-001.litwareinc.com"} limits the returned user accounts to those users homed on the pool dublin-cs-001.litwareinc.com. That collection of user accounts can then be piped to the Move-CsUser cmdlet:

Get-CsUser -Filter {RegistrarPool –eq "dublin-cs-001.litwareinc.com"}| Move-CsUser -Target "atl-cs-001.litwareinc.com"

 

  • To move users from one pool to a different pool by using a filter

To move a selected group of users (based on an Active Directory attribute) first use the Get-CsUser cmdlet and the LdapFilter parameter to retrieve the desired set of users. After retrieving the appropriate user accounts you can then pipe all those accounts to the Move-CsUser cmdlet:

Get-CsUser -LdapFilter "Department=Finance" | Move-CsUser -Target "atl-cs-001.litwareinc.com"

 

For more information:

 

Assign Policies to Users

Assign a Conferencing Policy to Modify a User's Default Meeting Experience

  • To assign a per-user conferencing policy

To assign a per-user conferencing policy to a user, use a command similar to this, specifying the Identity of the per-user policy as the parameter value for the PolicyName parameter:

Grant-CsConferencingPolicy –Identity "Ken Myer" –PolicyName "RedmondConferencingPolicy"

 

If you later decide to remove that conferencing policy (and thus have the user managed by the global policy or his or her site policy) use the following command, which sets the PolicyName property to a null value:

 

Grant-CsConferencingPolicy –Identity "Ken Myer" –PolicyName $Null

 

 

Specify Client Versions Supported for Sign-in by a User

  • To assign a per-user client version policy

To assign a per-user client version policy to a user, use a command similar to this, specifying the Identity of the per-user policy as the parameter value for the PolicyName parameter:

 

Grant-CsClientVersionPolicy –Identity "Ken Myer" –PolicyName "RedmondClientVersionPolicy"

If you later decide to remove that client version policy (and thus have the user managed by the global policy, a service policy, or his or her site policy) use the following command, which sets the PolicyName property to a null value:

 

Grant-CsClientVersionPolicy –Identity "Ken Myer" –PolicyName $Null

 

Assign Specific Dial-in Conferencing PIN Security Settings to a User

  • To assign a per-user PIN policy

To assign a per-user PIN policy to a user, use a command similar to this, specifying the Identity of the per-user policy as the parameter value for the PolicyName parameter:

 

Grant-CsPinPolicy –Identity "Ken Myer" –PolicyName "RedmondPinPolicy"

If you later decide to remove that PIN policy (and thus have the user managed by the global policy or his or her site policy) use the following command, which sets the PolicyName property to a null value:

 

Grant-CsPinPolicy –Identity "Ken Myer" –PolicyName $Null

 

Apply External User Access Policies to Users

  • To apply an external user policy to a user account

To assign a per-user external access policy to a user, use a command similar to this, specifying the Identity of the per-user policy as the parameter value for the PolicyName parameter:

 

Grant-CsExternalAccessPolicy –Identity "Ken Myer" –PolicyName "RedmondExternalAccessPolicy"

If you later decide to remove that external access policy (and thus have the user managed by the global policy or his or her site policy) use the following command, which sets the PolicyName property to a null value:

 

Grant-CsExternalAccessPolicy –Identity "Ken Myer" –PolicyName $Null

 

Configure Archiving of a User's Communications

  • To assign a per-user archiving policy

To assign a per-user archiving policy to a user, use a command similar to this, specifying the Identity of the per-user policy as the parameter value for the PolicyName parameter:

 

Grant-CsArchivingPolicy –Identity "Ken Myer" –PolicyName "RedmondArchivingPolicy"

 

If you later decide to remove that archiving policy (and thus have the user managed by the global policy or his or her site policy) use the following command, which sets the PolicyName property to a null value:

 

Grant-CsArchivingPolicy –Identity "Ken Myer" –PolicyName $Null

 

 

Assign a Location Policy to a User

  • To assign a per-user location policy

To assign a per-user conferencing policy to a user, use a command similar to this, specifying the Identity of the per-user policy as the parameter value for the PolicyName parameter:

 

Grant-CsLocationPolicy –Identity "Ken Myer" –PolicyName "RedmondLocationPolicy"

 

For more information

Enable a User for Enterprise Voice

  • To enable a user account for Enterprise Voice

To enable a user for Enterprise Voice, use Set-CsUser to set the EnterpriseVoiceEnabled property to True and to assign the user a unique line URI:

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

For more information

 

 

Configure Telephony for Users

  • To configure telephony for a specific user account

To configure telephony options for a user, use the Set-CsUser cmdlet. The following command enables a user for Enterprise Voice and assigns that user a line URI:

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

 

To enable remote call control for a user, use the following command:

 

Set-CsUser –Identity "Ken Myer" -RemoteCallControlTelephonyEnabled $True –LineUri "TEL:+14255551219"

 

This command enables PC-to-PC audio communications for the user, but without enabling either remote call control or Enterprise Voice:

 

Set-CsUser –Identity "Ken Myer" –EnterpriseVoiceEnabled $False -RemoteCallControlTelephonyEnabled $False –LineUri "TEL:+14255551219"

For more information