Was tidying some of my files after the last deployment that I was assigned and I realized that there was a couple of scripts that I used during the recent Lync engagement. This script are not something fantastic but I hope some of my visitors can benefit out from it.

1. The script below allows you to query from a specific Organization Unit (OU), where the users are filtered against the email address, and then enabling them as Lync users, assigned to the designated Pool

get-csaduser -filter {windowsemailaddress -like ‘*@domain.com’} -OU “ou=OrganizationUnitName,dc=domain,dc=com” | Enable-CsUser -RegistrarPool “PoolServer.domain.com” -SipAddressType EmailAddress

2. And so, my customer wanted to disable most of the users PC-to-PC call capabilities till futher notice. So the command below actually queries the specific OU and disabling the PC-to-PC call capabilities

get-csuser -OU “ou=OrganizationUnitName,dc=domain,dc=com” | Set-CSUser -AudioVideoDisable $True

3. And so…again, the customer changes he’s mind, he wants to allow the IT team, and the command below actually queries the IT OU and re-enabling the users to use PC-to-PC call

get-csuser -OU “ou=ITTeamOU,dc=domain,dc=com” | Set-CSUser -AudioVideoDisable $False

Hope that you guys could find this cmdlet useful when it comes to enabling bulk users and also enabling/disabling the Voice features.