Open a ticket
Chat with us
BLOG Published on 2020/10/25 by Asitha De Silva in Tech-Tips

Windows Virtual Desktop | Windows and Teams Optimization

The real value of Windows Virtual Desktop is the Multi-Session capability. When comparing to similar products of VDI, WVD Windows 10 image has the capability to cater to multiple users in a single VM. This will help to save Azure usage costs and other licensing costs. However, the VM can be slowed due to the number of users and their workloads. So, it is important to optimize the Windows 10 image while removing unnecessary applications, processors, and services.

Also, with this post, I am discussing optimizing the Teams app to use in multi-session while redirecting camera and audio to the local device. You can configure these settings to the golden image before deploying it in WVD. Please refer to my previous blog post on Image management (here)

Windows 10 Image optimization for WVD

There is a free tool available for optimizing windows 10, which will disable services and remove the application in the operating system that does not require windows virtual desktop session host. This tool is released as a community-driven implementation by Robert M. Smith and Tim Muessig from Microsoft and I referred the post from Christiaan Brinkhoff to implement in my environment. I used this script to optimize my WVD windows 10 image and using it as my golden image after SysPrep.

  1. To download the Optimization scripts, browse the following GitHub repository and click the code, and select download ZIP

    https://github.com/The-Virtual-Desktop-Team/Virtual-Desktop-Optimization-Tool



  2. Unzip the content to a folder
  3. Open PowerShell in Run as admin and change the Execution policy to Bypass as follows.


  4. Run the script using the following command inside the unzipped folder

    .\Win10_VirtualDesktop_Optimize.ps1 -WindowsVersion 2004 -Verbose

  5. After the optimization, restart the VM. Then you can SysPrep the image to use in Windows virtual desktop.

Before and After Optimization


Microsoft Teams Optimization for Windows Virtual Desktop

Microsoft has introduced Audio and Video redirection with media optimization for Microsoft teams running on Windows virtual desktop. With media optimization for Microsoft Teams, the Windows Desktop client handles audio-video locally for Teams calls and meetings. You need to install WebRTC clients, which will help to initiate a peer-to-peer high-performance streaming, device redirection to the same hardware device, and another modern decoding.

Installing Teams client with Per-machine mode

  1. Teams per machine installation only support WVD configured windows 10, so before installation, you need to create the below Registry entry to represent the WVD environment.
    Open Regedit and navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Teams\ and create a new key as Teams.




  2. Create a DWORD Value with Name – IsWVDEnvironment, Value-1


  3. Download the Teams MSI Per-Machine installation from the below URLs

    32bit MSI - https://aka.ms/teams64bitmsi
    64bit MSI - https://aka.ms/teams32bitmsi

  4. Navigate to the MSI location from the command prompt and run the below command to install the teams for per-machine mode.

    Msiexec /i Teams_windows_x64.msi /l*v Teams.log ALLUSERS=1 ALLUSER=1



  5. Now the Teams installation will be available in the Program files folder. Usually, it goes to the user's profile.


Install the WebRTC Client

  1. Download WebRTC Client from below URL -
  2. Run the installation




  3. Optional - If installation requests, you may require installing Microsoft Visual C++ Redistributable

    X86 - https://aka.ms/vs/16/release/vc_redist.x86.exe
    X64 - https://aka.ms/vs/16/release/vc_redist.x64.exe

  4. Restart the machine


Verifying Media Optimization

You can verify the media optimization by clicking About – Version. If everything is working, you can see Media optimized tag with the Teams version.



Also, you can see the AV redirection by Settings - Devices.



If you are getting WVD Not connected message, which means your optimization is not running. There is still some limitation on this optimization.

  • Only supported in Windows Desktop clients for Windows 10
  • Explicit Internet Proxies are not supported. However, one of my POC environments worked with Internet proxy with redirecting WVD and Azure traffic to the internet with NSG.
  • Due to WebRTC limitations, incoming and outgoing video stream resolution is limited to 720p
  • Calls and meetings do not support the application sharing. However, desktop sharing is working

Teams with native device redirection

You can use teams without media optimization. You should add the following RDP properties

  • audiocapturemode:i:1
  • audio mode:i:0
  • camerastoredirect:s:*

After these changes, you can capture and build a golden image as described in my earlier post and use it in Windows Virtual Desktop host pool implementation. From my next post, let's see how we can monitor WVD sessions and configurations using Azure Monitor and Log analytics.

I hope this post is useful. Please refer to my earlier posts for Windows Virtual Desktop.


01 – Working remotely and efficiently with Microsoft technologies

02 - Windows Virtual Desktop | Configuring Prerequisites and WVD Tenant Creation

03 - Windows Virtual Desktop | Create Host Pool and Access through Web, Client App, and Mobile Devices

04 - Windows Virtual Desktop | Configure FSLogix User Profiles using Azure Files and AD Authentication.

05 - Windows Virtual Desktop | Manage App groups and Publish Applications

06 - Windows Virtual Desktop | 2020 ARM Version | Deployment with Domain Services

07 - Windows Virtual Desktop | Extra security with Multi-Factor Authentication

08- Windows Virtual Desktop | Shadow sessions 

09-Windows Virtual Desktop | Image Management


Cheers

Asitha De Silva

Asitha De Silva

Consultant Cloud Solutions

Expert in architecting and implementing cloud-based infrastructure solutions.

Newsletter

To keep up with the news and updates related to our products, make sure to subscribe to our newsletter!

Copyright © 2025 Terminalworks. All Rights Reserved