Termsrv.dll Patch Windows Server 2022 -free-
The Termsrv.dll patch for Windows Server 2022 is a powerful, free tool that removes the two-session RDP limit. With a simple batch script, you can enable unlimited concurrent administrative connections without purchasing RDS CALs.
Pros:
Cons:
For developers, students, homelab enthusiasts, and testers, this patch is a lifesaver. For enterprise IT managers, it’s a landmine. Download the script, back up your system, and enjoy the freedom—but always with your eyes wide open.
Disclaimer: The author and this article are not responsible for any violation of licensing agreements, data loss, or security breaches resulting from the use of this patch. Proceed at your own risk.
copy C:\Windows\System32\termsrv.dll C:\Backup\termsrv_backup.dll
In Windows Server 2022 (Build 20348) , the specific byte pattern is located at hex offset 0x2D73A (may vary slightly with patches).
Some patchers target a different instruction: changing 7E (jump if less/equal) to EB (unconditional jump) or changing 75 to 74, but the modern "byte patch" for Server 2022 changes a 4-byte DWORD from 0x20000 to 0.
He stopped the Remote Desktop Services service. He replaced the original termsrv.dll with his patched version. He restarted the service.
The screen flickered. The spinning circle of the Windows boot process seemed to take an eternity. If the patch was wrong, if the checksums failed, the server would blue screen. He would have to rebuild the OS from scratch in the middle of the night.
Welcome.
The desktop appeared. Elias held his breath. He opened the Run dialog and typed mstsc. He connected to the server's IP from his laptop.
Session 1 connected. The desktop was there.
He opened a second window. Connected.
Session 2 connected.
Then Session 3.
Three separate windows, three separate user environments, running simultaneously on a box that was legally supposed to reject them. The "FREE" patch had worked. The gatekeeper was sleeping.
The termsrv.dll patch for Windows Server 2022 is a quick, zero-cost hack to enable concurrent RDP sessions, suitable only for lab environments, legacy application testing, or personal non-production use. For any business or production server, the legal, security, and stability risks far outweigh the convenience. Microsoft’s licensing model for RDS exists to ensure fair use and enterprise-grade scalability.
Final Recommendation: If you need multi-session RDP on Server 2022, purchase the appropriate RDS CALs. If you cannot afford CALs, consider using open-source remote access tools (e.g., Apache Guacamole, X2Go) or migrating workloads to Linux with XRDP.
Report generated for educational research on system file behavior. Do not deploy in regulated or commercial environments.
The practice of patching the termsrv.dll file on Windows Server 2022 is typically done to bypass the default concurrent session limits of Remote Desktop Services (RDS) without purchasing Client Access Licenses (CALs).
While various unofficial community guides and scripts (often hosted on platforms like GitHub) exist to perform this modification, it is important to understand the technical and legal context: Technical Overview
The DLL's Role: The termsrv.dll (Terminal Services Library) contains the logic that restricts the number of simultaneous RDP connections.
The Modification: "Patching" involves using a hex editor or an automated script to change specific bytes within the file. This tricks the operating system into allowing multiple concurrent sessions on a non-RDSH (Remote Desktop Session Host) configured server.
Persistence Issues: Windows Updates frequently overwrite this file. Any manual patch will likely be reverted during monthly security updates, requiring a re-patch or a script that runs automatically after updates. Official Alternatives
Instead of patching system files, Microsoft provides a supported path for managing multiple sessions: Termsrv.dll Patch Windows Server 2022 -FREE-
Remote Desktop Services (RDS) Role: You can install the RDS role via Server Manager to officially support multiple concurrent users.
Licensing: Proper deployment requires RDS Client Access Licenses (CALs). You can find information on official Windows Server 2022 licensing through Microsoft Learn. Risks and Warnings
Security: Modifying core system binaries can introduce vulnerabilities or system instability. Official security hardening for Windows Server 2022 usually advises against altering signed system files.
Compliance: Patching termsrv.dll to bypass session limits is a violation of the Microsoft Software License Terms.
Stability: If the patch is incompatible with a specific build of Windows Server 2022, it may cause the Remote Desktop service to fail to start entirely. What's New in Windows Server 2022 | Microsoft Learn
A Termsrv.dll patch for Windows Server 2022 is used to bypass the default limit on simultaneous Remote Desktop Protocol (RDP) sessions without requiring a formal Remote Desktop Services (RDS) deployment. By default, Windows Server allows only two concurrent administrative sessions; patching the system library allows for multiple simultaneous connections, essentially turning a standard server into a multi-user terminal server. What is Termsrv.dll?
The termsrv.dll file, located in C:\Windows\System32\, is the core library responsible for the Remote Desktop Service. It contains the hardcoded logic that checks the OS edition and restricts the number of active sessions. For Windows Server 2022, this limit is two users unless the Remote Desktop Session Host (RDSH) role is installed and licensed with RDS Client Access Licenses (CALs). Methods for Patching Windows Server 2022
There are three primary ways to achieve unlimited RDP sessions: manual binary patching, automated scripts, and "wrappers." 1. Automated Patcher Scripts (Recommended)
Tools like TermsrvPatcher simplify the process by finding the correct memory offsets for your specific Windows build.
How it works: These PowerShell scripts stop the Remote Desktop Service, take ownership of the DLL, and apply hex replacements to bypass the session check.
Resources: Projects like TermsrvPatcher on GitHub are regularly updated for Windows Server 2022 builds. 2. RDP Wrapper Library
The RDP Wrapper is a popular open-source tool that works differently: it does not modify your original termsrv.dll file. The Termsrv
The 2 RDP admin sessions allowed without an remote desktop license
Important Legal & Stability Disclaimer:
This content is for educational purposes. Modifying system files violates Microsoft’s EULA (except for licensed terminal services). Unauthorized modification can break security updates, violate compliance, and void support. Use only in lab/test environments.
Step 1: Locate the original file.
Open File Explorer and navigate to C:\Windows\System32. Locate termsrv.dll. Right-click → Properties → Security → Take ownership (Advanced → Change owner to Administrator). Then grant yourself Full Control.
Step 2: Stop the Remote Desktop Services.
Open services.msc as Administrator. Find Remote Desktop Services (TermService). Stop the service. Also stop Remote Desktop Services UserMode Port Redirector if running.
Step 3: Make a backup.
Copy termsrv.dll to termsrv.dll.backup in the same folder.
Step 4: Edit the binary. You need a hex editor. Download HxD (freeware) or Notepad++ with HEX-Editor plugin.
| Version | Offset | Original Bytes | Patched Bytes |
|---------|--------|----------------|----------------|
| 20348.1 | 0x17D4B0 | 39 41 08 0F 95 C0 | B0 01 90 90 90 |
| 20348.350 (newer) | 0x17D5C0 | 39 41 08 0F 95 C0 | B0 01 90 90 90 |
Note: Offsets may vary slightly with cumulative updates. The universal pattern to search for is the byte sequence 39 41 08 0F 95 C0 followed by C3 a few bytes later.
Alternatively, search for hex: 39 41 08 0F 95 C0 – replace with B0 01 90 90 90.
Step 5: Save the file.
Save the modified termsrv.dll. Windows may warn about file modifications – confirm.
Step 6: Restart the service (or reboot). Start the Remote Desktop Services again. If it fails, revert the backup and re-check the offset.