Get Skype for Business User Status/Availability issue in Powershell

前端 未结 2 1994
盖世英雄少女心
盖世英雄少女心 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: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

提交回复
热议问题