![为多个会话启用 RDP - 命令行选项](https://linux22.com/image/695831/%E4%B8%BA%E5%A4%9A%E4%B8%AA%E4%BC%9A%E8%AF%9D%E5%90%AF%E7%94%A8%20RDP%20-%20%E5%91%BD%E4%BB%A4%E8%A1%8C%E9%80%89%E9%A1%B9.png)
我已经熟悉如何通过组策略编辑器为 Server 2012 启用多个 RDP 会话。(https://support.managed.com/kb/a1816/how-to-enable-disable-multiple-rdp-sessions-in-windows-2012.aspx)
我想知道是否有办法通过命令行简化此操作。我正在尝试简化我的部署,这将加快该过程,而无需花时间打开组策略编辑器并进行更改。
答案1
REG DELETE "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v fSingleSessionPerUser /f
REG DELETE "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fSingleSessionPerUser /f
这也行得通:
REG ADD "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v fSingleSessionPerUser /t REG_DWORD /d 0 /f
REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fSingleSessionPerUser /t REG_DWORD /d 0 /f