get group members and check for users that is not enabled for lync and enable

#This script get group members and check for users that is not enabled for lync and enable these users using e-mail address

Import-Module activedirectory
Import-Module lync
$groupmember = Get-ADGroupMember lync
foreach ($member in $groupmember)
{
$aduser = Get-CsAdUser -Identity $member.Name | Where-Object {$_.enabled -ne "true"}
if($aduser -ne $())
{
Enable-CsUser -identity $aduser.identity -RegistrarPool lyncse.coex.com -SipAddressType emailaddress
}
}

你可能感兴趣的:(Enable,using,get,for,for,group,check,Address,users,users,that,and,and,is,e-mail,not,Lync,enabled,members,these)