Forum Discussion

Sean_Ng's avatar
Sean_Ng
Copper Contributor
Dec 03, 2019

powershell command for checking teams client online status

Hi all,

i like to get your help on finding a powershell command for checking teams client online status,

preferably i can put my teams client name into a text file, and the powershell can help me check if those teams client are currently online or offline will be my objective.

I have done some googling that there are cmdlets available for skype such as get-csOnlineUser

https://docs.microsoft.com/en-us/powershell/module/skype/get-csonlineuser?view=skype-ps

 

But so far , i not able to find anything for MS Teams, appreciate if anyone can point me to the right direction on this ? thanks in advance.

 

will something like this works for teams client with some tweaking ?

$client = [Microsoft.Lync.Model.LyncClient]::GetClient()

$contact = $client.ContactManager.GetContactByUri("spiderman@marvel.com")

$availabilityId = $contact.GetContactInformation("Availability")

$activity = $contact.GetContactInformation("Activity")

Write-Output ([Microsoft.Lync.Model.ContactAvailability]$availabilityId)

Resources