Add all Lync enabled users to a Active directory Group.

Needed one AD group that contained all Lync enabled users. Here this  group is called “A-Lync” 

import-module lync
Import-Module activedirectory
$lu=get-csuser
$lu|ForEach-Object{
    $_.Samaccountname
    Add-ADPrincipalGroupMembership -MemberOf A-Lync -Identity $_.Samaccountname
}

 

Leave a Reply