Tag Archives: lync bulk users group ou organizational unit enable-csuser get-csaduser

Bulk Lync User Addition via Powershell

When enabling users for the first time in Lync, we get a lot of requests for bulk enabling based on group membership or other factors.  If this is something you would like to do, you don’t need a tool, just check out the powerful get-csaduser and get-adgroupmember commands in Powershell: http://technet.microsoft.com/en-us/library/gg398592.aspx

Here’s a sample command to get you started on enabling users by group:

get-adgroupmember -identity “your group” |foreach {get-adus
er $_.samaccountname | foreach {enable-csuser -identity $_.userprincipalname -re
gistrarpool yourpool.domain.com -sipaddresstype samaccountname -sipdomain domain.com}}

 

If you wanted to enable all users by OU try this:

Get-CsADUser -OU “ou=Your OU Name,dc=domain,dc=com” | enable-csuser -registrarpool “Yourpool.domain.com” -sipaddresstype emailaddress

 

(Note: Edited June 6, 2014 because I found a group enablement command that I liked better)