Server 2016 [top]: Termsrv.dll Patch Windows
termsrv.dll on Windows Server 2016 is a common method for enabling multiple concurrent Remote Desktop (RDP) sessions, a feature typically restricted by Microsoft's licensing model. This practice involves modifying the system's binary file to bypass session limits. Core Concept: The termsrv.dll Patch termsrv.dll file, located in C:\Windows\System32
, is the main library responsible for managing Remote Desktop Services. By default, Windows Server 2016 allows only two concurrent sessions for administrative purposes. To exceed this without official Remote Desktop Services (RDS) licensing, the file's hex code is modified to trick the system into allowing more users. Microsoft Learn Methods for Patching Manual Hex Editing : This involves finding a specific byte sequence (e.g., 39 81 3C 06 00 00 ) within the DLL using a tool like
and replacing it with a sequence that ignores the session check. RDP Wrapper Library : An open-source tool, RDP Wrapper
, acts as a layer between the Service Control Manager and Remote Desktop Services. It loads the DLL with the necessary patches without permanently modifying the file on disk. Automated Scripts : PowerShell scripts like TermsrvPatcher
automate the backup, ownership change, and patching process for various Windows versions, including Server 2016. Key Technical Insights qwerity/windows10_multiuser_session - GitHub termsrv.dll patch windows server 2016
Title: Enable Multiple Concurrent RDP Sessions on Windows Server 2016 (termsrv.dll Patch)
Body:
If you need to allow more than two concurrent remote desktop connections on Windows Server 2016 (without RDS CALs), patching termsrv.dll is a common workaround. Use this only in lab/non-production environments, as it violates Microsoft licensing.
⚠️ Backup first: Copy C:\Windows\System32\termsrv.dll to a safe location. termsrv
Step 8: Restart Services or Reboot
net start TermService
net start UmRdpService
Or simply reboot.
5. Automated Solutions (Patching Scripts & Tools)
Because manual hex editing is tedious, the community has created automated patchers:
- Universal Termsrv.dll Patcher (by deepxw) – Supports multiple Windows versions including Server 2016.
- RDP Wrapper Library (by stascorp) – A more advanced, dynamic library that hooks
termsrv.dllat runtime without modifying the file directly. It works with Windows Server 2016 and survives most updates.
1. Install Remote Desktop Services (RDS) Role
- Install the "Remote Desktop Session Host" role via Server Manager.
- Purchase RDS Device or User CALs (Client Access Licenses).
- Configure licensing mode (Per User/Per Device).
- Allows hundreds of concurrent sessions.
- Cost: ~$100–$200 per user/device (one-time or annual).
7. Alternatives to Patching termsrv.dll
If you need more than 2 concurrent RDP sessions on Windows Server 2016, consider these legitimate alternatives:
Conclusion
The termsrv.dll patch for Windows Server 2016 offers a tempting way to unlock unlimited concurrent RDP sessions without licensing costs. For homelabs, testing, and non-critical internal tools, it remains a popular workaround. However, production environments should never rely on this hack. Title: Enable Multiple Concurrent RDP Sessions on Windows
By following the step-by-step manual patching guide above—backing up files, using the correct hex pattern, and understanding the risks—you can safely remove the two-session limit. Just remember: every Windows Update may break the patch, and Microsoft’s licensing team will not forgive violations.
If you truly need multi-user RDP, budget for RDS CALs. But for the tinkerer and the budget-conscious lab admin, the termsrv.dll patch lives on as a clever, if unsanctioned, solution.
Pre-Patch Checklist
To minimize risk, complete these steps:
- [ ] Take a full system backup (or snapshot if running in a VM).
- [ ] Export the current
termsrv.dllas a backup:
copy C:\Windows\System32\termsrv.dll C:\Backup\termsrv_original.dll - [ ] Note your Windows Server 2016 exact build number:
winver(e.g., Version 1607, OS Build 14393.1234) - [ ] Disable Windows Defender Real-time Protection temporarily (or add exclusion for System32).
- [ ] Ensure you have local administrator rights and RDP access (in case you lock yourself out).
- [ ] Have a recovery plan: boot from ISO or safe mode to restore original DLL.
Step 5: Restart the Service
- Restart the Remote Desktop Service:
net start TermService
Considerations and Best Practices
- Backup Before Updates: Always create a system backup before applying updates, especially if you're unsure about their impact on custom configurations or line-of-business applications.
- Test Updates: If possible, test updates on a development or staging server before applying them to production environments.
- Reboot Requirement: Some updates, especially those affecting core components like
termsrv.dll, may require a server reboot to take effect.