Here is a possible title and article with html formatting for the keyword \"windows server 2012 termsrv.dll 53\":
How to Enable Multiple RDP Sessions on Windows Server 2012 R2 with termsrv.dll Patch
If you want to allow more than one remote user to connect to your Windows Server 2012 R2 machine via Remote Desktop Services, you may encounter a problem with the termsrv.dll file. This file is responsible for managing the remote connections and limiting them to one per non-Windows-Server edition. However, there is a way to bypass this restriction by patching (modifying some bytes in) the termsrv.dll file.
In this article, we will show you how to patch the termsrv.dll file with PowerShell and enable multiple RDP sessions on Windows Server 2012 R2. This method is based on the instructions from this website and this GitHub issue. Please note that you are using this script at your own risk and we cannot be held responsible for any damages caused.
Step 1: Stop the UmRdpService and TermService services
Before you can patch the termsrv.dll file, you need to stop the two services that depend on it: UmRdpService (Remote Desktop Services UserMode Port Redirector) and TermService (Remote Desktop Services). You can do this by running the following PowerShell commands as an administrator:
You can also check the status of these services by running:
Step 3: Patch the termsrv.dll file with PowerShell
The patching process involves replacing some bytes in the termsrv.dll file that determine the number of allowed remote connections. The exact bytes depend on the Windows edition and version. In this case, we are using Windows Server 2012 R2 Update 9th November, 2021, which has a termsrv.dll version of 6.3.9600.20165. You can download this version of the file from here.
To patch the termsrv.dll file with PowerShell, you need to read it as a byte array, convert it to a hexadecimal string, replace the bytes with a regular expression, convert it back to a byte array, and write it to a new file. You can do this by running the following PowerShell script as an administrator: