Bulk Enable Lync Users By Group In One Line

There are a few scripts out there to take an AD group or Exchange distribution group and enable those users for Lync.  I like those scripts, they give you a lot of flexibility and power, but for a quick cut and paste job sometimes I like an equally quick one-liner.  This is a single line of PowerShell I developed for enabling users in Lync based upon a group.  With a minor edit, it can be used for just about any Lync PowerShell command you want to fit in there by replacing the command in bold.  Enjoy.

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

One thought on “Bulk Enable Lync Users By Group In One Line

Comments are closed.