Enabling users for Lync with Telephony options
One of my Team member had a requirement to enable multiple uses for LYNC Pool and also disable the telephony options. The utlimate goal was to acheieve this in a single command.
Thanks a Lot Vinayaka for involving me in this task.
After a lot of brianstorming we were able to achieve the same :)
First we need to make sure that the module for Lync is available in the powerhsell. If not please run the following command :
import-module 'C:\Program Files\Common Files\Microsoft Lync Server 2010\Modules\Lync\Lync.psd1'
Let's take an Example of Users in an Orgnatizational Unit (OU) called Lync Users
$a=get-csaduser -filter {Enabled -ne $True} -OU "OU=Lync Users,DC=Contoso,DC=com"
foreach ($b in $a) {Enable-CsUser $b.UserPrincipalName -RegistrarPool Lync-FE-PoolA.Contoso.com -SipAddressType EmailAddress}
sleep 180;
foreach ($c in $a) {Set-CsUser $c.UserPrincipalName -AudioVideoDisabled $true }
If you want to enable Lync for all users in the active Directory do not mention the OU paramenter in variable $a.
We may have to change the Sleep value depending on the Active Directory Replication interval in your environment.
Let's take another Example where we have users in a CSV format
CSV file Format
Name,UserprincipalName
User1,user1@contosot.com
User2,user2@contoso.com
$a=Import-Csv .\users.csv
foreach ($b in $a) {Enable-CsUser $b.UserPrincipalName -RegistrarPool Lync-FE-PoolA.Contoso.com -SipAddressType UserPrincipalName}
sleep 180;
foreach ($c in $a) {Set-CsUser $c.UserPrincipalName -AudioVideoDisabled $true }
We may have to change the Sleep value depending on the Active Directory Replication interval in your environment.
Written by:
Naveen Vasudevan, Technical Lead, Enterprise Communications Services, Microsoft
Different Option :https://blogs.technet.com/b/csps/archive/2010/06/06/howtotelephony.aspx