Want to allow multiple RDP sessions in Windows? You can establish multiple remote desktop connections at the same time on a Windows system however, this feature is restricted by license. It prevents you from creating a Terminal RDP server. If you need this service, you have to buy a Windows Server license, RDS CALS, and Remote Desktop Session Host (RDSH) should be installed on your computer. If you want a free alternative you can use RDP (Remote Desktop Protocol) to create multiple Connections. In this article, we will discuss how you can enable RDP for multiple users on your Windows 11 computer.
How to enable RDP for multiple users on windows 11
After understanding the requirement of any company, you may deploy the device at different locations. some are in office sites and easily accessible and some are in remote locations. All those devices have different brands and they may have different operating systems. Managing such networks is a challenging job for an IT administrator and Remote Desktop Connection makes your work easy.
Use the following methods to enable Remote Desktop Connection on Windows 11.
- Use RDP Wrapper Library
- Modify termsrv.dll Using HEX Editor
- Patch termsrv.dll With PowerShell Script
- Modify the Local Group Policies
Let’s discuss these methods to enable Remote Desktop Connection.
How to allow multiple RDP sessions in Windows
1] Use RDP Wrapper Library
RDP Wrapper Library is a free open-source GitHub project that works as an intermediate between Remote Desktop Service and Service Control Manager(SCM). It allows users to make multiple RDP sessions on Windows 11 and you can also configure the RDP server on Windows Home editions without teasing the ‘termsrv.dll’ file. For simultaneous connection, RDP Wrapper Library loads the termsrv.dll library with updated parameters. It should be better for you to check the unpatched termsrv.dll file before installing RDP Wrapper Library.
Let’s enable RDP Wrapper Libary using the following steps.
- Download the RDP Wrapper Library from github.com.
- Extract the contents of the zip file.
- Right-click on “install.bat” and select Run as administrator.
- Hit on ‘RDPConfig.exe’ to open RDP Wrapper Configuration and complete the installation process.
It has been seen that after installation of RDP Wrapper, it shows, it is running, but it is not working on Windows 10 (ver. 10.0.19041.1320).
- Download the rdpwrap.ini file’s current version on your computer from raw.githubusercontent.com.
- Open the downloaded file, select all content from there, hit Ctrl+ C, open file explorer, go to C:\Program Files\RDP Wrapper\rdpwrap.ini file, and paste all the copied contents.
- Reboot the computer.
- Hit on ‘RDPConfig.exe’ to open ‘RDP Wrapper Configuration.’ Verify if all items are green in the Diagnostics section.
- Hit on ‘RDPCheck.exe’ to open a secondary RDP session or connect multiple RDP sessions from your remote computers.
Hopefully, this will do the trick for you.
2] Modify termsrv.dll Using HEX Editor
The next and most effective solution for enabling multiple remote desktop connections on Windows 11 computers is to modify the termsrv.dll file. Follow the prescribed solution to enable RDP on your computer.
- Back up the termserv.dll file before modifying it.
- Press Windows +R, type cmd, and press Ctrl + Shift + Enter to open the Command Prompt as an administrator.
- Enter the following command in the Command Prompt to create a backup.
copy c:\Windows\System32\termsrv.dll termsrv.dll_backup
- To give ownership to the local administrator, run this command
takeown /F c:\Windows\System32\termsrv.dll /A
- After successful completion, you will see the following SUCCESS message.
“c:\Windows\System32\termsrv.dll” is now owned by the administrator group.
- To allow the local administrators group with Full Control permissions for the termsrv.dll file using the icacls.exe, run this:
icacls c:\Windows\System32\termsrv.dll /grant Administrators:F
- After completing the operation successfully, you will see the following message:
c:\Windows\System32\termsrv.dll Successfully processed 1 file; Failed processing 0 files.
- Terminate Remote Desktop Services (TermService) with the services.msc console. You can also run the following command:
Net stop TermService
- To know the Windows version and build number, open PowerShell and run the following command:
Get-ComputerInfo | select WindowsProductName, WindowsVersion
- Download a HEX editor software of your choice for example Registry Explorer and Install it.
- Launch the ‘termsrv.dll’ file with HEX editor software. This Tiny Hexer editor is incapable of altering ‘termsvr.dll’ files from the system32 folder, so you have to copy it to your Desktop, to make alteration.
- According to your Windows version and build, you need to find the following string.
Windows 11 RTM (21H2 – 22000.258): 39 81 3C 06 00 00 0F 84 4F 68 01 00/ Windows 10 x64 21H2: 39 81 3C 06 00 00 0F 84 DB 61 01 00/ Windows 10 x64 21H1: 39 81 3C 06 00 00 0F 84 2B 5F 01 00/ Windows 10 x64 20H2: 39 81 3C 06 00 00 0F 84 21 68 01 00/ Windows 10 x64 2004: 39 81 3C 06 00 00 0F 84 D9 51 01 00/ Windows 10 x64 1909: 39 81 3C 06 00 00 0F 84 5D 61 01 00/ Windows 10 x64 1903: 39 81 3C 06 00 00 0F 84 5D 61 01 00/ Windows 10 x64 1809: 39 81 3C 06 00 00 0F 84 3B 2B 01 00/ Windows 10 x64 1803: 8B 99 3C 06 00 00 8B B9 38 06 00 00/ Windows 10 x64 1709: 39 81 3C 06 00 00 0F 84 B1 7D 02 00
- Now you should replace that string with the following string.
39 81 3C 06 00 00 0F 84 7F 2C 01 00
Finally, save the file, and run TermService.
3] Patch termsrv.dll With PowerShell Script
If your requirement of using Multiple Remote Desktop Connections is not resolved by modifying the termsrv.dll file manually using a HEX editor then you can use the following PowerShell script.
Let’s patch the termsrv.dll file with the help of a PowerShell Script.
- Copy the following code and paste it into a Notepad file.
# Stop RDP service, make a backup of the termsrv.dllfile and change the permissionsStop-Service UmRdpService -ForceStop-Service TermService -Force$termsrv_dll_acl = Get-Acl c:\windows\system32\termsrv.dllCopy-Item c:\windows\system32\termsrv.dll c:\windows\system32\termsrv.dll.copytakeown /f c:\windows\system32\termsrv.dll$new_termsrv_dll_owner = (Get-Acl c:\windows\system32\termsrv.dll).ownercmd /c "icacls c:\windows\system32\termsrv.dll /Grant $($new_termsrv_dll_owner):F /C"# search for a pattern in termsrv.dll file$dll_as_bytes = Get-Content c:\windows\system32\termsrv.dll -Raw -Encoding byte$dll_as_text = $dll_as_bytes.forEach('ToString', 'X2') -join '$patternregex = ([regex]'39 81 3C 06 00 00(\s\S\S){6}')$patch = 'B8 00 01 00 00 89 81 38 06 00 00 90'$checkPattern=Select-String -Pattern $patternregex -InputObject $dll_as_textIf ($checkPattern -ne $null) {$dll_as_text_replaced = $dll_as_text -replace $patternregex, $patch}Elseif (Select-String -Pattern $patch -InputObject $dll_as_text) {Write-Output 'The termsrv.dll file is already patch, exitting'Exit}else {Write-Output “Pattern not found”}# patching termsrv.dll[byte[]] $dll_as_bytes_replaced = -split $dll_as_text_replaced -replace '^', '0x'Set-Content c:\windows\system32\termsrv.dll.patched -Encoding Byte -Value $dll_as_bytes_replaced# comparing two filesfc.exe /b c:\windows\system32\termsrv.dll.patched c:\windows\system32\termsrv.dll# replacing the original termsrv.dll fileCopy-Item c:\windows\system32\termsrv.dll.patched c:\windows\system32\termsrv.dll -ForceSet-Acl c:\windows\system32\termsrv.dll $termsrv_dll_aclStart-Service UmRdpServiceStart-Service TermService
- Save this file with extension .ps1 (for example: TermsRdpPatch.ps1).
- To alter the PowerShell execution policy settings for the present session, run the following PowerShell command:
Set-ExecutionPolicy Bypass -Scope Process -Force
- Hit on ‘termsrv_rdp_patch.ps1’ to run the script.
Make sure that you manually edit the termsrv.dll file every time after updating the Windows. This will do the trick for you.
4] Modify the Local Group Policies
We have one more method by which we can enable remote desktop connection and it is the Local Group Policy. We can also enable remote desktop connection by modifying group policy.
Let’s modify the Local Group Policy.
- Press the Windows + R
- Write gpedit.msc in the RUN dialog box and hit enter to open the Local Group Policy Editor panel.
- Go to Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Connections.
- Click on the ‘Restrict Remote Desktop Services’ user and change it to a single ‘Remote Desktop Services’ session policy and set it to Disabled.
- Click on the ‘Limit number of connections’ policy. The default state is ‘Not Configured.’ Select the Enabled radio button to enable the counter menu of ‘RD Maximum Connections’ permitted in the ‘Options’ section.
- Set the ‘RD Maximum Connections’ permitted to 999999.
- Click on OK to save the changes and Restart Windows.
After making these changes your RDP session is configured for multiple users.
So, as you can see, you can easily enable multiple concurrent users in Remote Desktop using any of the aforementioned methods. If you don’t want to download a third-party app or use a batch file, your best option is to configure the Group Policy ofRestrict Remote Desktop Services,however, alternate methods are there to give you options.