Cameras To Redirect Custom RDP Property Does not Work

Occasional Contributor

In mstsc.exe, under Local Resources > More.. there is an option for Video capture devices.  Which lists my webcam and Devices that I plug in later.  I have determined that this option the an RDP file is the string camerastoredirect:s:*  So what I have done is ran the following command on my Connection Broker so that this line will be added to rdp file generated by the feed.

Set-RDSessionCollectionConfiguration -CollectionName $CollectionName -CustomRdpProperty "camerastoredirect:s:*"

When I run Get-RDSessionCollectionConfiguration I see the value has been added to CustomRdpProperty along with "use redirection server name:i:1" which seems to be a default on all collections.
What I am trying to solve is, why does my custom RDP property not apply to the RDP files that are downloaded.

9 Replies

We have exactly the same issue, is there already a solution for this?

I have found a solution for this:

Go to the following location
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Terminal Server\CentralPublishedResources\PublishedFarms<Farm Name>\RemoteDesktops<Resource Name>\RDPFileContents

Export the registry file with the program O&O Regeditor.
Make a copy of your backup and edit the copy.
Add the following line to the config: camerastoredirect:s:* with notepad plus plus
Save the file
Import the reg file with O&O Regeditor  


@Ryan_Janssen  Thanks for the tip. 

I actually had to create a VBscript because notepad++ wasn't breaking the lines properly.

I'll put the script on my GitHub repo this weekend.

@Ryan_Janssen So editing this does not invalidate the signing of the rdp file when it is downloaded?  I suppose that this will need to be updated if the feed settings are ever updated by an admin


@RoanPaes I don't see a script in the github repository you mention.  But I believe using get-itemproperty and set-itemproperty with $value += "camerastoredirect:s:*`n" should be sufficient

I was able to run this powershell command on each connection broker and it was able to work.  I would also still run the Set-RDSessionCollectionConfiguration command for the custom value as well.


<collection alias> would be the value of CollectionAlias from Get-RDSessionCollection



$alias = <collection Alias>
$RDPFileContents = (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Terminal Server\CentralPublishedResources\PublishedFarms\$alias\RemoteDesktops\$alias\").RDPFileContents
$RDPFileContents += "camerastoredirect:s:*`n"
Set-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Terminal Server\CentralPublishedResources\PublishedFarms\$alias\RemoteDesktops\$alias\" -Name RDPFileContents -Value $RDPFileContents



Like I thought, editing the collection overwrites this value and it has to be updated again. The fact that the property does not get to the file property is a bug I believe. How can we escalate this with Microsoft's rdp team?

@Matt_OCC  I was unable to upload the VB because of clients info within the file.  But I feel your solution works way better. 

The one I used roughly looks like the below (it is missing lots of bits and pieces, but the idea is, once you have your registry exported, you create the VBS file with all you need plus the camera support).


 & "promptcredentialonce:i:1" & VbCrLf _
& "videoplaybackmode:i:1" & VbCrLf _
& "audiocapturemode:i:1" & VbCrLf _
& "gatewayusagemethod:i:2" & VbCrLf _
& "gatewayprofileusagemethod:i:1" & VbCrLf _
& "gatewaycredentialssource:i:0" & VbCrLf _
& "full" & VbCrLf _
& "" & VbCrLf _
& "workspace" & VbCrLf _
& "use redirection server name:i:1" & VbCrLf _
& "loadbalanceinfo:s:tsv://MS Terminal Services Plugin.1.RDS-Desktop" & VbCrLf _

Dim WSHShell
set WSHShell = CreateObject("WScript.Shell")
WSHShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Terminal Server\CentralPublishedResources\PublishedFarms\BCB-Desktop\RemoteDesktops\BCB-Desktop\RDPFileContent", myval, "REG_SZ"

@RoanPaes I found editing the registry directly through powershell the easies.  I've run into the issue with a HA collection continually gets written over any time any collection in the deployment changed.  It seems to be part of the sync process between the collection brokers.  I've written a small script to cycle through all of the collections and append the registry to deal with it, just haven't decided on when I should trigger this.

I just want to say that the PS code is brilliant and worked flawlessly for me. This is such an aggravating issue that I don't know why it is not in the GUI settings to begin with.