When working with Windows Server 2012 Standard edition, you might encounter a frustrating limitation where only two concurrent Remote Desktop Protocol (RDP) sessions are allowed, even for non-administrative users. The error message There are too many users signed in
appears despite Microsoft's documentation mentioning "unlimited" RDS users.
Windows Server 2012 Standard edition has these key limitations:
- 2 concurrent RDP sessions (including both admin and non-admin)
- No Remote Desktop Services (RDS) role enabled by default
- Terminal Services licensing not configured
Here are three practical solutions:
Method 1: Patch the Termsrv.dll File
This modifies the built-in session limit:
1. Take ownership of C:\Windows\System32\termsrv.dll
2. Edit the file with a hex editor
3. Change the byte sequence:
39 81 3C 06 00 00 0F 84 → B8 00 01 00 00 89 81 38
4. Reboot the server
Method 2: Use Group Policy Editor
For temporary testing purposes:
1. Run gpedit.msc
2. Navigate to:
Computer Configuration → Administrative Templates → Windows Components → Remote Desktop Services → Remote Desktop Session Host → Connections
3. Enable "Restrict Remote Desktop Services users to a single Remote Desktop Services session"
4. Set "Limit number of connections" to 999999
Method 3: Official Approach with RDS Licensing
The proper enterprise solution:
- Install Remote Desktop Services role
- Configure RDS Licensing
- Purchase RDS CALs (Client Access Licenses)
Before implementing any workaround:
- Method 1 may violate Microsoft's EULA
- Performance impacts may occur with many sessions
- For production environments, Method 3 is recommended
Here's a PowerShell script to monitor RDP sessions:
function Get-RDPConnections {
qwinsta | Where-Object { $_ -match '^ (\S+)' } | ForEach-Object {
[PSCustomObject]@{
SessionName = $matches[1]
Username = ($_ -split '\s+')[1]
ID = ($_ -split '\s+')[2]
State = ($_ -split '\s+')[3]
}
}
}
Get-RDPConnections | Format-Table -AutoSize
Windows Server 2012 Standard Edition has an inherent limitation that only allows 2 concurrent RDP sessions by default, regardless of whether the users are administrators or not. The "unlimited RDS users" mentioned in documentation refers to Remote Desktop Services (RDS) licensing, which requires additional configuration.
For development environments where proper RDS licensing isn't feasible, consider using RDP Wrapper:
# Download RDP Wrapper from GitHub
git clone https://github.com/stascorp/rdpwrap.git
cd rdpwrap
install.bat
# Verify installation
RDPWInst -s
This open-source solution works by:
- Replacing termsrv.dll with a patched version
- Creating a service that bypasses the connection limit
- Maintaining full RDP functionality
For production environments, set up Remote Desktop Services properly:
# PowerShell commands to install RDS
Install-WindowsFeature RDS-RD-Server -IncludeManagementTools
Install-WindowsFeature RDS-Licensing -IncludeManagementTools
# Configure license server
Set-RDLicenseConfiguration -LicenseServer "localhost" -Mode "PerUser"
As a temporary measure, you can modify the registry:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server]
"fDenyTSConnections"=dword:00000000
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\Licensing Core]
"EnableConcurrentSessions"=dword:00000001
Warning: This violates Microsoft's EULA and may cause stability issues.
To check current RDP sessions programmatically:
# PowerShell command
query session /server:localhost
# C# alternative
using System.Management;
var scope = new ManagementScope(@"\\localhost\root\cimv2");
var query = new ObjectQuery("SELECT * FROM Win32_Process WHERE Name='rdpclip.exe'");
var searcher = new ManagementObjectSearcher(scope, query);