Pages

Showing posts with label Lync Power Shell Scripts. Show all posts
Showing posts with label Lync Power Shell Scripts. Show all posts

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"
}
else
{
Write $sipaddress "User Is Enabled!"
}
}

Here is the OutPut

sip:raju.raju@Contoso.com
User Is Enabled!