Wednesday, June 1, 2011

Lync 2010 - Enabling All Users in OU

Here is a quick script to enable all users in Lync 2010. To run this all on one computer you need to have Lync Tools and RSAT on it. This script is enabling all users using their EmailAddress as their SIP address. Change out domain with your domain name and Myusers with your OU or Container. The is  your Lync Pool FQDN.
Import-Module activedirectory
Import-Module Lync
Get-ADUser -Filter * -SearchBase "OU=MyUsers,dc=domain,dc=com" | foreach {Enable-CsUser -RegistrarPool "" -SipAddressType EmailAddress -SipDomain "" -Identity $_.SamAccountName}
RSAT with SP1