Sign out a stuck or disconnected RDP session

Find and close a frozen or forgotten Remote Desktop session with quser, logoff and reset session, or from Task Manager, so you can connect again.

  • Intermediate
  • Windows VPS · Admin RDP
  • 4 min read

By RunRacks Team · Published

A Remote Desktop session can get stuck: the screen freezes, a disconnected session keeps holding one of the server's slots, or Windows tells you another user is already connected. The fix is to sign that session out from a working session or from the server console. This guide shows the commands and the graphical way to do it.

Before you start

  • A RunRacks Windows VPS (Windows Server 2019, 2022 or 2025) or an Admin RDP desktop.
  • An administrator account. Connect as usual on 203.0.113.10:12230.
  • If you cannot connect at all, use the browser console from the control panel in your Dashboard. It reaches the server's local console without Remote Desktop.

List the sessions

From any working session, or from the browser console, open Command Prompt or PowerShell and run:

Command Prompt
quser

Example output:

Text
 USERNAME     SESSIONNAME        ID  STATE   IDLE TIME  LOGON TIME
>admin        rdp-tcp#7           2  Active          .  11/9/2026 10:15 AM
 deploy                           3  Disc        2:40  11/9/2026 7:31 AM
  • ID is the number you need for the next step.
  • Disc means disconnected: the session is still running, but no one is attached.
  • The > marks the session you are using now. Do not sign that one out by mistake.

For a fuller list that also shows the console and listener sessions, use:

Command Prompt
query session

Sign out a session by ID

To sign out session 3:

Command Prompt
logoff 3

Windows closes the session and its programs. Run quser again and the line should be gone.

If logoff hangs or the session stays in the list, force a reset:

Command Prompt
reset session 3

reset session (also available as rwinsta) tears the session down without waiting for programs to close cleanly. Use it only when logoff fails.

Use Task Manager instead

If you prefer a graphical tool:

  1. Right-click the taskbar and choose Task Manager, or press Ctrl + Shift + Esc.
  2. Click More details if it opens in the small view.
  3. Open the Users tab.
  4. Right-click the stuck user and choose Sign off. Choose Disconnect instead if you only want to free the connection and keep their programs running.

On an Admin RDP desktop running Windows 10/11, only one person can use the desktop at a time, so the Users tab normally shows just your own account and any session left at the local console.

When RDP says another user is connected

On Windows Server, without the Session Host role, only two remote sessions can run at once. When both are taken, you see a prompt asking you to disconnect another user.

  1. If you can connect as an administrator, accept the prompt to disconnect one user, then sign out the old session with logoff.
  2. If you cannot get past the prompt, open the browser console from the Dashboard, sign in, and run quser and logoff there.
  3. As a last resort, restart the server from the Dashboard control panel. A restart ends every session.

Check it works

  1. Run quser and confirm the stuck session is no longer listed.
  2. Connect from your PC to 203.0.113.10:12230.
  3. You should get a fresh desktop, without a prompt about other users.

Troubleshooting

  • "Error 5 getting session names" or access denied: your prompt is not elevated or your account is not an administrator. Open Command Prompt with Run as administrator.
  • The session comes back as soon as you sign it out: a program or script is reconnecting with saved credentials. Check other PCs and connection tools that use that account.
  • *`quser` shows "No User exists for \":** no one is signed in. The problem is elsewhere, such as the network or the port. See Fix "Remote Desktop can't connect to the remote computer".
  • Sessions keep piling up in Disc state: set a disconnected time limit so Windows cleans them up for you.
  • The screen is black after you reconnect: press Ctrl + Alt + End and choose Cancel, or sign out and reconnect.

Next steps

Was this guide helpful?

Still stuck?

Ask RunRacks AI for a quick answer, or open a ticket and our team will take a look at your server.

Troubleshooting

Fix Nginx 413 Request Entity Too Large

Nginx returns 413 Request Entity Too Large when an upload is bigger than client_max_body_size. Raise the limit for one site or the whole server, match PHP's limits, and test.

  • Beginner
  • Linux VPS
  • 5 min read

Troubleshooting

Is your ISP or router blocking port 12230? How to tell

Work out whether your internet provider, home router, parental controls or a proxy is blocking RDP port 12230, and collect the details support needs to help.

  • Intermediate
  • Windows VPS · Admin RDP
  • 5 min read