Fixing Teams Media Optimisation in Windows Virtual Desktop

Back in July of 2020 (so long ago it seems), Windows Virtual Desktop saw a massive leap forward with Spring Release otherwise commonly known as ARM Release. One of the major changes this bought forward was media optimization and AV redirection for Teams using the WebRTC client.

Christiaan Brinkhoff has a great step by step here, walking you through the benefits and the deployment method. However, I’m not here to discuss how great it is. No, instead I want to walk you through what happens when it breaks and how to fix it. However, if you are running into the issue I outline below, make sure you’ve covered your basics:

  • Windows Virtual Desktop Remote Client for Windows
  • Teams Per Machine installation, minimum version
  • Microsoft C++ Redistributable
  • Remote Desktop WebRTC Redirector Service
  • Relevant registry edits

The symptoms

The first sign of an issue is very obvious – media redirection for Teams doesn’t work. Users won’t be able to use their web cams or their microphones. Further investigation of the Teams version will show that WVD Media Optimised is also absent. It should appear as WVD Media Optimisation is not available if the client doesn’t support it (such as the web browser).

A problematic host
A healthy host for comparison

You can workaround the media redirection issue by adding the below to the Host Pool properties however in my experience it was very hit and miss, taking days to apply.


Further Investigation

There are a couple of other things to check as well. When using media redirection, the program MsRdcWebRTCSvc.exe should launch both in a system context and a per user context for the host. However, when media redirection isn’t detected or working correctly, it only launches in the system context. This can be checked by launching Task Manager and going to the Details pane.

A healthy host showing both the user and system context

Lastly, by exporting the Teams diagnostic log files, we can check the VDI mode context. To do this, launch Teams and wait for it to load to the user interface. While running, enter the key combination Ctrl + Alt + Shift + 1 to export the files.

These log files are exported to the active user Downloads directory as shown below. The file we’re interested in is the 2.1MB diagnostics log file.

On approximately line 117 you will find the variable vdiMode. For Windows Virtual Desktop environments, this should be listed as 5100 however in this case, it is listed as 2000 which is for Citrix environments.

Why Citrix..?

Good question! When building this pool I ran into the same issue Jacques Bensimon covered here – adding the Citrix PortICA registry edit. The ALLUSER=1 flag that Jacques discusses is at odds with the requirement that Microsoft specify here. I unfortunately haven’t had a chance to further test other methods to get around the installation error but will update this post when I can.

The Fix surprisingly simple. Delete it all. You’ll need to delete both the Citrix registry entries as well as the Teams cache, located in %appdata%\Microsoft\Teams then reboot the host.

2 thoughts on “Fixing Teams Media Optimisation in Windows Virtual Desktop

  1. Hi Chris, Thanks for this post. I seem to be experiencing this issue in my environment, I had to use the citrix registry keys to install machine wide teams otherwise the install fails. My issue is that, correct my teams logs are returning vdimode 2000 and teams and is not optimized. However I have cleared the citrix reg keys, included the ‘IsWVDEnvironment’ key as suggested by microsoft and restarted the host however no Dice, when teams is launched it still does not say that it is optimised. Would you happen to have any further suggestions? Cheers


    1. Did the host actually restart correctly? Keep in mind that Windows 10 has a ‘soft’ shutdown mode so to speak. Easy way to check this is the system uptime in task manager. Aside from that, assuming the log is coming back correctly for Teams mode, I’d contact MS support, ideally premier if you can


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: