Get Skype for Business User Status/Availability issue in Powershell

前端 未结 2 1967
盖世英雄少女心
盖世英雄少女心 2021-01-07 12:17

I\'m using powershell to get the Status/Availability of certain users by using the following code:

Import-Module \"C:\\...\\Microsoft.Lync.Model.dll\"

$Clie         


        
相关标签:
2条回答
  • 2021-01-07 12:39

    Looks like you have to subscribe to user presence information. Lync SDK MSDN documentation has outlined the solution at https://msdn.microsoft.com/en-us/library/office/jj937284.aspx.

    Similar solution at https://social.msdn.microsoft.com/Forums/en-US/12357db7-769f-4808-bc99-9b2fb2ed8ce2/presence-unknown?forum=communicatorsdk

    0 讨论(0)
  • 2021-01-07 12:56

    Only workaround I have found is to create a conversation with the target user like this

    $client = [Microsoft.Lync.Model.LyncClient]::GetClient()
    $contact = $client.ContactManager.GetContactByUri($email)
    $convo = $client.ConversationManager.AddConversation()
    $convo.AddParticipant($contact) | Out-Null
    Write-Host $contact.GetContactInformation("Activity")
    $convo.End() | Out-Null
    

    It doesn't appear to cause any IM windows to popup on the users side.

    It would be interesting to see your powershell code for the subscription solution

    0 讨论(0)
提交回复
热议问题