net stop TermService /y takeown /f C:\Windows\System32\termsrv.dll icacls C:\Windows\System32\termsrv.dll /grant administrators:F
Always create a backup copy so you can restore the system if the patch fails.
While patching termsrv.dll is an effective workaround for lab environments, small businesses, or testing scenarios, you must be aware of the following:
These limits can be frustrating for teams that need to perform joint troubleshooting, development, or maintenance tasks. They can also lead to productivity delays when an administrator has to forcibly disconnect another user’s session to log in. As a result, many technical professionals look for ways to modify the behavior of termsrv.dll to allow unrestricted concurrent RDP sessions.
Or download the installer package from community-maintained repositories like ruanjian668's rdpwrap.ini. termsrvdll patch windows server 2022 free work
Windows Server 2022 limits concurrent Remote Desktop (RDP) sessions. Standard installations allow only two simultaneous administrative connections. If a third user attempts to log in, the system prompts them to disconnect an active session.
The termsrv.dll file is the core dynamic link library responsible for managing Remote Desktop Services. Microsoft hardcodes connection limits directly into this file. : 2 concurrent administrative sessions.
From a security perspective, removing session limits could expose your server to . If the server is internet‑facing or accessible by many users, an attacker could consume all available RDP sessions, leading to a denial of service. Ensure that you have robust network‑level authentication (NLA) and firewall rules in place.
Run RDPConf.exe (included with RDPWrap) and confirm all components show status. As a result, many technical professionals look for
$termsrvDllFile = "$env:SystemRoot\System32\termsrv.dll" $termsrvDllBackup = "$env:SystemRoot\System32\termsrv.dll.backup"
: Administrators comfortable with PowerShell who want minimal dependencies.
For example, in many builds, you search for the byte sequence related to session limits (e.g., 39 81 3C 06 00 00 ) and replace it with an unrestricted sequence (e.g., B8 00 01 00 00 89 81 38 06 00 00 90 ).
For Windows Server 2022, the script uses a pattern‑based replacement approach identical to that for Windows 10 and Windows 11 23H2, which has been tested on various builds. The script works with PowerShell 5.1 or higher and requires administrative privileges. or budget-constrained setups
icacls C:\Windows\System32\termsrv.dll /grant Administrators:F Use code with caution. Step 3: Backup the Original File
Note: For updated versions of Windows Server 2022, the pattern location and offsets shift. You must search for the function CServerUtils::IsSingleUserSessionEnabled to find the exact conditional jump assembly instructions to modify. Step 5: Restart the Service Save the modified file in the hex editor. Return to the console. Right-click Remote Desktop Services and select Start . Automated Alternative: RDPWrap
Overcoming this limitation typically requires purchasing Remote Desktop Services (RDS) Client Access Licenses (CALs) and configuring an RDS License Server. However, for testing, lab environments, or budget-constrained setups, administrators often look for ways to patch the termsrv.dll file to allow unlimited concurrent connections for free.
Right-click install.bat → Run as Administrator .