Enable Audio and Video Redirection for Windows Virtual Desktop
Microsoft recently updated Teams to make it even easier to use audio/video within WVD! While the blog post below may still be useful, check out our more recent post on Enabling Audio and Video for Microsoft Teams on Windows Virtual Desktop using Media Optimizations. If you prefer using Audio & Video Redirection instead of Media Optimizations, you can now even configure that without PowerShell (if you created your tenant via the Azure Portal). Check out that post here: Edit Windows Virtual Desktop Properties in the Azure Portal.
Looking to let users leverage Teams through Windows Virtual Desktop (WVD)? No problem! To enable Audio/Video redirection, we’ll need to set the following custom RDP properties:
audiocapturemode:i:1
enables audio capture from the local device and redirects audio applications in the remote session.audiomode:i:0
plays audio on the local computer.camerastoredirect:s:*
redirects all cameras.
To do this, all we need to do is run two PowerShell commands against our WVD tenant:
Add-RdsAccount -DeploymentUrl "https://rdbroker.wvd.microsoft.com" Set-RdsHostPool -TenantName <tenantname> -Name <hostpoolname> -CustomRdpProperty "audiomode:i:0;audiocapturemode:i:1;camerastoredirect:s:*;devicestoredirect:s:*"
(This does assume you have the WVD PowerShell and Az modules installed, which were also required for standing up WVD)
You can use this command to set any of the RDP settings, which can be found here: https://docs.microsoft.com/en-us/windows-server/remote/remote-desktop-services/clients/rdp-files. For example, if you’re looking to disable clipboard access as well, the command would be:
Set-RdsHostPool -TenantName <tenantname> -Name <hostpoolname> -CustomRdpProperty "audiomode:i:0;audiocapturemode:i:1;camerastoredirect:s:*;devicestoredirect:s:*;redirectclipboard:i:0"
Once that’s configured, if you open the Remote Desktop client (download for Windows 7/10 here) you will see Remote Audio and Camera working in Teams:
Now – you may notice that through the HTML5 WVD connection, there is no microphone input device under settings:
This is because, unfortunately, HTML5 does not support Audio Redirection:
So make sure you keep on eye out on which settings are supported! The supportability is listed on the same site as the settings. Happy deploying! š»
Do we need take some other action for the updated settings to take effect? I have executed the command successfully and rebooted the virtual machine but still no audio redirection.
OMG!!! I so f*cking exited to test
Same for me.
Aaaaaaaa!!! It’s working! You are the best! It’s like Christmas
What you have done to work it?
fyi audio redirection does work, but it’s disabled by default in windows 10 group policy. you need to have ‘Allow audio recording redirection’ enabled in group policy (steps below). Then in RDP settings window for local resources, click Settings under Remote Audio, then make sure settings are ‘Record from this computer’ and ‘Play on this computer’.
Editing group policy:
1) Click Start > Run, type gpedit. …
2) Expand Local Computer Policy/Computer Configuration/Administrative Templates/Windows Components/Remote Desktop Services/Remote Desktop Session Host.
3) In Device and Resource redirection, double-click Allow Audio and Video Playback Redirection. …
4) Click Enabled, and then click OK. (might need to reboot after this change? can’t remember)
Please update your article, based on the recent changes in the WVD Teams optimization. See https://docs.microsoft.com/en-us/azure/virtual-desktop/teams-on-wvd
Hi Mark – thanks for commenting! We just published an updated post for enabling media optimizations: https://deviceadvice.io/2020/09/01/enabling-audio-and-video-for-microsoft-teams-on-windows-virtual-desktop-using-media-optimizations/
Here it worked as follows:
1- Sign in to Azure at https://portal.azure.com.
2-Insert virtual Windows desktop into the search bar.
3-In services, select Windows virtual desktop.
4- On the Windows virtual desktop page, select host pools from the menu on the left side of the screen.
5- Select the name of the host pool you want to update.
6- Select Properties from the menu on the left side of the screen.
7- On the Properties tab, go to RDP settings to start editing RDP properties. Properties must be in a semicolon-separated format, such as PowerShell examples.
8- in the field RDP properties put:
audiocapturemode:i:1;camerastoredirect:s:*;
When finished, select save to save your changes.
9 -After 1 hour do a test
This process is done to work the audio and camera via remote desktop client for WVD machines. Browser RDP does not work because HTML5 does not support it.
Thank you for posting these instructions! I also wrote an updated blog post here, now that the properties can be edited in the Azure Portal instead of via PowerShell: https://deviceadvice.io/2020/08/17/edit-windows-virtual-desktop-properties-in-the-azure-portal/
Thank you for sharing this info. Saved my day