Forum Discussion
Cameras To Redirect Custom RDP Property Does not Work
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
- RoanPaesMay 29, 2020Copper Contributor
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 address:s:REMOTE.yourdomain.com" & VbCrLf _
& "gatewayhostname:s:remote.yourdomain.com" & VbCrLf _
& "workspace id:s:REMOTE.yourdomain.com" & 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"- Matt_OCCJul 13, 2020Copper Contributor
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.