0X00001B94

Fix ERROR_CTX_WINSTATIONS_DISABLED (0X00001B94) on Windows Server

Windows Errors Intermediate 👁 1 views 📅 May 26, 2026

Remote Desktop logins fail with error 0X00001B94 when Terminal Services session limits are hit. Here's how to fix it fast.

You're sitting at your desk, trying to RDP into your Windows Server 2019 box, and instead of the login screen you get: 'Remote logons are currently disabled' with error code 0X00001B94. It usually happens after a reboot or when someone's left a disconnected session hanging for days. The exact trigger? You've hit the maximum number of concurrent RDP sessions allowed by your license mode. This isn't a network issue or a firewall problem — it's a session count limit that Windows enforces when it can't get a proper Remote Desktop Services (RDS) CAL.

What Actually Causes This Error

Under the hood, Windows Server uses either Per User or Per Device licensing mode. When the license server can't grant a new CAL because all available licenses are in use, or when the license mode is set to something the server can't verify, it blocks new logins. The error code 0X00001B94 maps to STATUS_CTX_WINSTATIONS_DISABLED — the system deliberately disabled new Terminal Services connections.

Most of the time, I see this on servers where someone set the license mode to Per User but didn't install or configure an RDS license server. The server then falls back to a 120-day grace period, and once that expires — or after a reboot that resets session counts — it blocks everyone out. Another common trigger: you have the default 2 remote desktop sessions limit enabled but you've got 5 disconnected sessions eating up slots.

The short version: the server thinks it's out of legal RDP seats, so it shuts the door.

How to Fix It (Numbered Steps)

I've fixed this on dozens of servers. Here's the order I use — skip to step 3 if you already know you have an RDS license server set up.

  1. Check current license mode via Registry

    Open Registry Editor and go to:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\Licensing Core

    Look for LicensingMode. A value of 4 means Per User, 2 means Per Device, and 0 means undefined (which also triggers the error). Change it to 2 (Per Device) if you don't have a license server — that's the safer default for small setups.

  2. Set license mode via Group Policy (if you're in a domain)

    Open Group Policy Management Console, find the policy that applies to your server, and go to:

    Computer Configuration > Policies > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Licensing

    Enable 'Set the Remote Desktop licensing mode' and pick Per Device. Also enable 'Use the specified Remote Desktop license servers' and enter your license server's FQDN. If you don't have a license server, leave this blank — Per Device mode will still work with the 120-day grace.

  3. Kill stale sessions (quick fix)

    Open Command Prompt as Administrator and run:

    query session

    This lists all active and disconnected sessions. Look for ones with Disc status. Log them out with:

    logoff [session ID]

    For example, logoff 2. This frees up a license slot immediately. Do this for every disconnected session except console (session 1).

  4. Restart the Remote Desktop Services service

    After logging off stale sessions, restart the service:

    net stop TermService
    net start TermService

    This reloads the licensing state. Try RDP again — it'll work now.

  5. Permanent fix: Install RDS Licensing role

    If this keeps happening, you need a proper RDS license server. On the same server or a separate one, add the Remote Desktop Licensing role via Server Manager. Then activate it with a valid RDS CAL pack. Once done, point your session host to it (step 2). This stops the error from coming back after grace periods.

What to Check If It Still Fails

If the error persists after following all steps, here's what's usually wrong:

  • License server unreachable — DNS misconfiguration or firewall blocking port 135 (RPC). Run nslookup [your license server] to verify resolution.
  • RDS Licensing Manager shows no licenses installed — Open the Licensing Manager, right-click your server, and check if licenses are actually activated.
  • Grace period corrupted — This is rare but happens. Reboot the server twice. The first reboot clears the grace period timer, the second reinitializes it.
  • Third-party RDP wrapper interfering — If you're using something like RDP Wrapper Library (for non-server Windows), it can mess with the session limit. Uninstall it and stick to the built-in RDP configuration.

I've seen this error pop up on Windows Server 2012 R2 through 2022, and once on a Windows 10 Pro machine that had the RDP wrapper installed (that was a fun afternoon). The fix is always the same: get the license mode right and clear those hanging sessions. You'll be back in within 10 minutes.

Was this solution helpful?