Pages

Showing posts with label Lync 2013. Show all posts
Showing posts with label Lync 2013. 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!

Sunday, March 8, 2015

Lync User Last Login Time using SQL

Lync User Last Login Time using SQL

In this Blog we will see Lync users last login time using Sql Query

SELECT  u.UserUri
      ,us.[LastLogInTime]

  FROM [LcsCDR].[dbo].[UserStatistics] us left join
  [LcsCDR].[dbo].Users u on us.UserId = u.UserId
  order by us.LastLogInTime desc