By - Markus Zehnle

[QuickPost] (new) Microsoft Teams VDI – Monitoring API Script (W365, AVD, Citrix)

Reading Time: 5 minutes

 

UPDATE 23rd of May 2025

After a conversation with Fernando K. and Kenny W. from Microsoft, I realized that my initial approach to detecting Teams optimization didn’t cover all possible scenarios and was a bit too simplistic.
I’ve now updated the script in blog, github and also ControlUp to incorporate these new insights, and I’m releasing version 1.1 for download.

The vdiMode parameter behaves as follows…
The first digit indicates the vendor of the remoting solution:
1 and 2 = Citrix
3 = Horizon
5 = AVD / Windows 365

The second digit represents the type of optimization:
1 = Not optimized
2 = WebRTC
3 = SlimCore

It’s important to note that SlimCore is only fully utilized if the vdiConnectedState is set to “remote”.

=======================================

 

On May 6, 2025, Fernando Klurfan—former Citrix rockstar and now Microsoft rockstar—published an insightful blog post introducing a range of new features for Microsoft Teams for VDI:
Microsoft Teams VDI – State of the Union, Spring 2025

Among the many exciting enhancements, one feature in particular caught my attention: Monitoring API.

 

This new API opens up promising possibilities for administrators and EUC professionals. It provides real-time visibility into key telemetry and session data, allowing for better troubleshooting, diagnostics, and performance monitoring of Teams running inside virtualized environments like Citrix, Omnissa Horizon, or AVD/W365.

 

Fernando even references a potential PowerShell script that can query and display live telemetry data from Teams when running in VDI mode.
I found this especially compelling—so much so that I asked ChatGPT to help me create such a script. The result works remarkably well, and I’d like to share it with you.

 

The script interacts with the new Monitoring API and pulls live data from a running Teams session. Depending on the optimization method used, the output varies:

  • SlimCore Optimized
    AVD/W365 SlimCore optimized
  • WebRTC Optimized
    Citrix WebRTC optimized
    WebRTC optimization doesnt throw that much information…
  • Not optimized
    <screenshot follows>

 

You can get the script here or at Github (CLICK HERE):

 

As always, please exercise caution and review any script before executing it—especially those downloaded from the internet.
Disclaimer: I assume no liability for any damage caused by running this script.
You are very welcome to fix the bugs and modify the script on your behalf.

 

 

One More Thing

If you’re using ControlUp (like I do), you can download a ready-made XML version of the script here to import it into the ControlUp RealtimeDX Console.
Show Microsoft Teams for VDI Optimization (new Teams only).xml

A script for ControlUp for Desktops, aka EdgeDX, will follow soon.

 

 

It’s exciting to see Microsoft finally providing tools that enable deeper insight and better control over the virtualized Teams experience. I’m looking forward to seeing how this evolves—and to hearing how others are using it in their environments.
Let me know what you think—and feel free to improve or expand the script as needed!

2 thoughts on “[QuickPost] (new) Microsoft Teams VDI – Monitoring API Script (W365, AVD, Citrix)

Brian Langston 23-05-2025 at 15:06

Hi, great script. One item I noticed is that on my machine, Slimcore optimization shows as mode 2201. I’ll check the others and update here as well.

Reply

    Markus Zehnle 23-05-2025 at 15:18

    Hi Brian,
    thanks for testing.
    I had a chat with Fernando an engineering which showed that my reverse engineering regarding vdiMode was not completely right 🙂
    I hope I can update my script later…

    Reply

Leave a Reply

Your email address will not be published.
*
*