Sunday, March 22, 2015

More Lync PowerShell Scripts

In this Blog we will see more Power Shell Scripts.

This Script will give you an output who all the users are enabled for SIP Address

$FilePath = "C:\temp\users.csv"
$Stuff = Import-CSV $FilePath

ForEach ($_.SAMid in $Stuff)
$SipAddress = "sip:"+$_.SipAddress

$User= Get-CsUser –Identity $SipAddress

If($User.Enabled -eq $null)
Write $sipaddress "not found"
elseif($User.Enabled -eq $false)
Write "Do Enable"
Write $sipaddress "User Is Enabled!"

Here is the OutPut
User Is Enabled!

No comments:

Post a Comment