How to Pass-Through Audio and Video in AVD

New Feature Alert: Nerdio for Azure now has the option to pass through A/V with one click! Find it in the drop-down menu on pools next to the "Manage Hosts" button:Servers_page.png

or find in the drop-down menu on dedicated AVD desktops next to the "Start desktop" button:Users_page.png

This feature enables "audiocapturemode:i:1;camerastoredirect:s:*;" automatically. You can proceed with the instructions below if you need to confirm the customRDPproperties in use on a pool (Whether Nerdio enabled it or not), or to change them for passing-through other devices.

---------------


In this article we will show you how to pass-through (a.k.a redirect) microphone and web cameras to your AVD session hosts via Powershell. It is also possible to pass through USB and other devices; see the included link to Microsoft documentation that describe all the properties available, and their supported AVD settings.

You can paste everything below into Powershell ISE and use the F8 key to run the line your keyboard caret is currently on. Use keyboard arrows or your mouse to move down the commands in order.

Note:  Any support for hardware, cameras and microphones should come directly from the original equipment manufacturer.  Nerdio does not include any drivers and mechanisms to support the functionality of those redirected devices.

Let's get started.


# Get the modules you need

Install-Module -Name Microsoft.RDInfra.RDPowerShell
Import-Module -Name Microsoft.RDInfra.RDPowerShell


# Set the name of the pool you are changing (change if not A, of course)

$pool = "pool-a" 


# Log in to the AVD account. Here you need global admin on the Azure AD Tenant and ownership to the AVD tenant

Add-RdsAccount -DeploymentUrl "https://rdbroker.avd.microsoft.com"


#If you are having trouble with the prior step; take note:

# Usually the original admin@tenantName.onmicrosoft.com has the correct permissions. If not, your CSP can help you secure an account with this "owner role" access.

# You may also try to gain the correct permissions by submitting this form again :
#- Paste in the Microsoft Entra ID Tenant ID, which you can find within Azure Portal

#- Login with a username known to have global admin and ownership to this tenant

#- Submit it twice! Once with Server selected, and the second time with Client selected.

# Tip: Don't expect the next steps to work if this step is erroring out!

 


# Next, an easy way to get the correct tenant name

$tenant = Get-RdsTenant | select -ExpandProperty tenantname


# Incase you were curious what that name was, print it to the screen

echo $tenant


# This next command shows us the current pool settings.
# In the output note what is set for CustomRdpProperty before your changes

Get-RdsHostPool -TenantName $tenant -Name $pool



# Now we will SET the property you want.
#  NOTE: In the example below we set Microphone and All Camera pass through.
#  ----- All Properties listed at the link below.
# Supported Remote Desktop RDP file settings - https://docs.microsoft.com/en-us/windows-server/remote/remote-desktop-services/clients/rdp-files


# Before continuing, Make sure you understand which properties YOU are changing and test accordingly.
# Nerdio cannot help you troubleshoot your changes -- you must escalate any that are not working directly to Microsoft through a ticket with your CSP.
# You can revert back to the default string at any time, which is ""

Set-RdsHostPool -TenantName $tenant -Name $pool -CustomRdpProperty "audiocapturemode:i:1;camerastoredirect:s:*;"



# Now you will check your work. 

Get-RdsHostPool -TenantName $tenant -Name $pool



Do you see the CustomRdpProperty you changed? And no syntax errors? Great job! Now it's time to test. Make sure to unsubscribe the Remote Desktop app, and resubscribe. Then log in to a fresh session and see if everything works as expected. 

 

Was this article helpful?

0 out of 0 found this helpful
Have more questions? Submit a request

Comments (0 comments)

Article is closed for comments.