Microsoft frequently updates termsrv.dll during monthly cumulative updates. A security patch will overwrite your modified file, requiring you to re-apply the patch. Prerequisites Before Patching
The technique of modifying termsrv.dll is officially documented in the MITRE ATT&CK framework as :
By default, the NT SERVICE\TrustedInstaller account owns critical system files. You must transfer ownership to the local Administrators group to modify it. Open File Explorer and navigate to C:\Windows\System32 . Locate termsrv.dll , right-click it, and select . Go to the Security tab and click Advanced . Next to the Owner field, click Change .
A Quality Update replaced your modified DLL with a factory-fresh version.
To patch the file manually, use a hex editor (like HxD). If you are using Windows Server 2016 (Build 14393), look for the following byte patterns. 39 81 3C 06 00 00 0F 84 B1 7D 02 00 Use code with caution. Replace it with this hex string: B8 00 01 00 00 90 89 81 3C 06 00 00 Use code with caution. termsrv.dll patch windows server 2016
Type Administrators into the object name box, click , and click OK . Click Apply and then OK . Back on the Security tab, click Edit to change permissions.
A: Theoretically unlimited, limited only by RAM and CPU. Realistically 10-20 sessions before performance degrades.
Create a copy of the original file. This ensures you can recover if the system encounters errors. In C:\Windows\System32 , locate termsrv.dll . Copy and paste the file in the same directory. Rename the copy to termsrv.dll.bak . Step 4: Patch the termsrv.dll File
termsrv.dll on Windows Server 2016 is a common workaround to enable multiple concurrent Remote Desktop Protocol (RDP) sessions without purchasing expensive Remote Desktop Services (RDS) Client Access Licenses (CALs). By default, Windows Server allows only two concurrent administrative sessions; patching this file removes that restriction. Methods for Patching termsrv.dll There are two primary ways to bypass session limits: RDP Wrapper Library : A safer alternative that does not modify the original termsrv.dll Microsoft frequently updates termsrv
Before deploying this patch in any capacity, consider the long-term impact on your infrastructure:
Rename the current file to create a backup. powershell ren %SystemRoot%\System32\termsrv.dll termsrv.dll.bak Use code with caution.
The Definitive Guide to Patching termsrv.dll in Windows Server 2016
(Note: The /y switch automatically stops dependent services like the Remote Desktop Services UserMode Port Redirector). Step 4: Hex Edit the Termsrv.dll File You must transfer ownership to the local Administrators
To allow multiple sessions, you need to use a hex editor (such as HxD, Notepad++, or 010 Editor) to alter specific byte sequences within the file. The exact hex values depend entirely on your specific build version of Windows Server 2016.
Obtain a patched version of termsrv.dll specifically for your build of Windows Server 2016 (1607).
Open RDPConf.exe again. All status lines (Wrapper, Service, Listener) should now display in . Troubleshooting Common Issues Issue 1: "Access Denied" when saving the file