Sunday, April 24, 2011

Blog Post: Powershell Script get group members and check for users that are not enabled for lync and enable these users using e-mail address

#This script get group members and check for users that is not enabled for lync and enable these users using e-mail address (PC to PC not enterprise voice)

01 Import-Module activedirectory
02 Import-Module lync
03 $groupmember = Get-ADGroupMember lync
04 foreach ($member in $groupmember)
05 {
06 $aduser = Get-CsAdUser -Identity $member.Name | Where-Object {$_.enabled -ne "true"}
07 if($aduser -ne $())
08 {
09 Enable-CsUser -identity $aduser.identity -RegistrarPool lyncse.coex.com -SipAddressType emailaddress
10 }
11 }

Drea de Matteo Trista Rehn Moon Bloodgood Kristin Kreuk Molly Sims

No comments:

Post a Comment