RDS 导出的 .rdp 文件配置可以通过 PowerShell 或者注册表进行修改。
比如,如果想要修改显示颜色位宽,可以在运行 RD Broker 的机器上执行以下操作:
# set Set-RDVirtualDesktopCollectionConfiguration -CollectionName "<CollectionName>" -CustomRdpProperty "session bpp:i:24" # or Import-Module RemoteDesktop Set-RDVirtualDesktopCollectionConfiguration -CollectionName "<CollectionName>" -CustomRdpProperty "gatewayhostname:s:my.gateway.server:4343" Set-RDSessionCollectionConfiguration -CollectionName "<CollectionName>" -CustomRdpProperty "camerastoredirect:s:*" # reset Set-RDVirtualDesktopCollectionConfiguration -CollectionName "<CollectionName>" -CustomRdpProperty ""
如果需要设置多个参数的话,需要使用`n
换行符,如
Set-RDSessionCollectionConfiguration -CollectionName "QuickSessionCollection" -CustomRdpProperty "pre-authentication server address:s:https://remotedesktoptest-aadapdemo.msappproxy.net/`nrequire pre-authentication:i:1"
相应的,也可以直接修改注册表,位置在:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Terminal Server\CentralPublishedResources\PublishedFarms\
参考: