windows10企业版开启RDP多用户同时登录

编程入门 行业动态 更新时间:2024-10-26 16:28:59

1、系统属性,开启远程桌面,添加远程桌面登录用户;

2、快捷键win+R,输入 gpedit.msc ,打开本地组策略编辑器。选择“【管理模板】—>【Windows组件】—>【远程桌面服务】—>【远程桌面会话主机】—>【连接】

配置【限制连接的数量】,点击“已启用”,其中允许的RD最大连接数可以自己视情况而定

配置【允许用户通过使用远程桌面服务进行远程连接】,选择启用。

配置【将远程桌面服务用户限制到单独的远程桌面服务会话】,选择启用: 

3、快捷键win+R键,输入msconfig,选择安全模式,重启进入安全模式

4、安全模式下运行如下脚本:

# PowerShell script used to patch termsrv.dll file and allow multiple RDP connections on Windows 10 (1809 and never) and Windows 11 
# Details here http://woshub/how-to-allow-multiple-rdp-sessions-in-windows-10/

# Stop RDP service, make a backup of the termsrv.dllfile and change the permissions 
Stop-Service UmRdpService -Force
Stop-Service TermService -Force
$termsrv_dll_acl = Get-Acl c:\windows\system32\termsrv.dll
Copy-Item c:\windows\system32\termsrv.dll c:\windows\system32\termsrv.dll.copy
takeown /f c:\windows\system32\termsrv.dll
$new_termsrv_dll_owner = (Get-Acl c:\windows\system32\termsrv.dll).owner
cmd /c "icacls c:\windows\system32\termsrv.dll /Grant $($new_termsrv_dll_owner):F /C"
# search for a pattern in termsrv.dll file 
$dll_as_bytes = Get-Content c:\windows\system32\termsrv.dll -Raw -Encoding byte
$dll_as_text = $dll_as_bytes.forEach('ToString', 'X2') -join ' '
$patternregex = ([regex]'39 81 3C 06 00 00(\s\S\S){6}')
$patch = 'B8 00 01 00 00 89 81 38 06 00 00 90'
$checkPattern=Select-String -Pattern $patternregex -InputObject $dll_as_text
If ($checkPattern -ne $null) {
    $dll_as_text_replaced = $dll_as_text -replace $patternregex, $patch
}
Elseif (Select-String -Pattern $patch -InputObject $dll_as_text) {
    Write-Output 'The termsrv.dll file is already patch, exitting'
    Exit
}
else { 
    Write-Output "Pattern not found "
}
# patching termsrv.dll
[byte[]] $dll_as_bytes_replaced = -split $dll_as_text_replaced -replace '^', '0x'
Set-Content c:\windows\system32\termsrv.dll.patched -Encoding Byte -Value $dll_as_bytes_replaced
# comparing two files 
fc.exe /b c:\windows\system32\termsrv.dll.patched c:\windows\system32\termsrv.dll
# replacing the original termsrv.dll file 
Copy-Item c:\windows\system32\termsrv.dll.patched c:\windows\system32\termsrv.dll -Force
Set-Acl c:\windows\system32\termsrv.dll $termsrv_dll_acl
Start-Service UmRdpService
Start-Service TermService

5、msconfig,恢复正常模式,重新启动

4、完毕

更多推荐

windows10企业版开启RDP多用户同时登录

本文发布于:2023-06-14 04:39:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1439369.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:多用户   企业版   RDP

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!