powershell command for checking teams client online status

%3CLINGO-SUB%20id%3D%22lingo-sub-1043336%22%20slang%3D%22en-US%22%3Epowershell%20command%20for%20checking%20teams%20client%20online%20status%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1043336%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20all%2C%3C%2FP%3E%3CP%3Ei%20like%20to%20get%20your%20help%20on%20finding%20a%20powershell%20command%20for%20checking%20teams%20client%20online%20status%2C%3C%2FP%3E%3CP%3Epreferably%20i%20can%20put%20my%20teams%20client%20name%20into%20a%20text%20file%2C%20and%20the%20powershell%20can%20help%20me%20check%20if%20those%20teams%20client%20are%20currently%20online%20or%20offline%20will%20be%20my%20objective.%3C%2FP%3E%3CP%3EI%20have%20done%20some%20googling%20that%20there%20are%20cmdlets%20available%20for%20skype%20such%20as%20get-csOnlineUser%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fmodule%2Fskype%2Fget-csonlineuser%3Fview%3Dskype-ps%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fmodule%2Fskype%2Fget-csonlineuser%3Fview%3Dskype-ps%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%20so%20far%20%2C%20i%20not%20able%20to%20find%20anything%20for%20MS%20Teams%2C%20appreciate%20if%20anyone%20can%20point%20me%20to%20the%20right%20direction%20on%20this%20%3F%20thanks%20in%20advance.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ewill%20something%20like%20this%20works%20for%20teams%20client%20with%20some%20tweaking%20%3F%3C%2FP%3E%3CP%3E%24client%20%3D%20%5BMicrosoft.Lync.Model.LyncClient%5D%3A%3AGetClient()%3C%2FP%3E%3CP%3E%24contact%20%3D%20%24client.ContactManager.GetContactByUri(%22spiderman%40marvel.com%22)%3C%2FP%3E%3CP%3E%24availabilityId%20%3D%20%24contact.GetContactInformation(%22Availability%22)%3C%2FP%3E%3CP%3E%24activity%20%3D%20%24contact.GetContactInformation(%22Activity%22)%3C%2FP%3E%3CP%3EWrite-Output%20(%5BMicrosoft.Lync.Model.ContactAvailability%5D%24availabilityId)%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1043336%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESkype%20for%20Business%20-%20Teams%20and%20On-Prem%20Exchange%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ETeams%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EWindows%20PowerShell%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1046569%22%20slang%3D%22en-US%22%3ERe%3A%20powershell%20command%20for%20checking%20teams%20client%20online%20status%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1046569%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F449593%22%20target%3D%22_blank%22%3E%40Sean_Ng%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHope%2C%20as%20of%20now%2C%20there%20is%20no%20powershell%20command%20or%20public%20API%20(Graph%20API)%20to%20get%20Teams%20Users%20Online%20Status.%20Microsoft%20Team%20working%20to%20support%20this%20API.%20You%20can%20post%20your%20vote%20in%20following%20user-voice%20thread.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fmicrosoftteams.uservoice.com%2Fforums%2F555103-public%2Fsuggestions%2F35689261-blynclight-for-microsoft-teams%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fmicrosoftteams.uservoice.com%2Fforums%2F555103-public%2Fsuggestions%2F35689261-blynclight-for-microsoft-teams%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

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)

1 Reply
Highlighted

@Sean_Ng 

 

Hope, as of now, there is no powershell command or public API (Graph API) to get Teams Users Online Status. Microsoft Team working to support this API. You can post your vote in following user-voice thread.

 

https://microsoftteams.uservoice.com/forums/555103-public/suggestions/35689261-blynclight-for-micros...