What happens if I disconnect user in Task Manager

October 14, 2019 updated by Leave a reply »

How do I sign out other user accounts without restarting the computer? When someone forgets to log out of a public or shared PC, their account still consumes RAM in the background. To free up the resources being used by other logged-in accounts, you can log them off using Task Manager, Command Prompt and PowerShell.

Method 1: Log Off Another User Using Task Manager

Press the Ctrl + Shift + Esc keyboard shortcut to launch Task Manager. Go to the Users tab, it will list all users that are currently signed in to your system. Right-click on the user you want to log off and select the Sign off option.

What happens if I disconnect user in Task Manager

You will get a warning that says the user’s unsaved data might be lost. Click on Sign out user when you need to proceed.

What happens if I disconnect user in Task Manager

Method 2: Log Off Another User Using Command Prompt

Open the Command Prompt with administrative rights, run the query session command to see all users currently logged into the computer. Take note of the session ID of the user you want to sign out.

What happens if I disconnect user in Task Manager

Next, run the following command to log off your desired account by specifying the session ID.
logoff ID

What happens if I disconnect user in Task Manager

This method doesn’t give you any alert or confirmation that the user you’re signing out will lose unsaved work.

Method 3: Log Off Another User Using PowerShell

Open Windows PowerShell with administrative rights, and type the following commands. Replace “Server01” with your computer’s name and substitute “pcunlocker” with the name of the account you want to log out.
$server = 'Server01'
$username = 'pcunlocker'
$sessionId = ((quser /server:$server | Where-Object { $_ -match $userName }) -split ' +')[2]
logoff $sessionId /server:$server

What happens if I disconnect user in Task Manager

Once logged off, the user account is no longer listed in Task Manager. Signing a user out this way has the same risk of losing all unsaved data as the above method.


  • Previous Post: Fix: Windows 10 Keeps Going to Sleep After 2 Minutes
  • Next Post: 3 Methods to Check Your Motherboard Model in Windows 10

You may want to see which users are logged on to your Windows 2016 Server at any given time and may want to logoff a user. Users can be “active” on a server or in a “disconnected” session status which means they disconnected from the server but didn’t log off.  Since disconnected sessions continue to utilize server resources, we recommend you enable a group policy to log off disconnected sessions automatically after a specific time period such as 5 minutes or X hours – easiest method is to enable a group policy to set session time limits for all users as follows:

  1. Cmd prompt, gpedit.msc
  2. Computer Configuration, Admin Templates, Windows Components, Remote Desktop Services, Remote Desktop Session Host, Session Time Limits
    1. Enable appropriate group policies and modify as needed
    2. We recommend setting this one because it will prevent disconnected sessions from consuming server resources — “Set time limit for disconnect sessions”
  3. After modifying group policies, you can force an update without rebooting by typing “gpupdate /force” at cmd prompt

By default, we now release Windows 2016 Servers with the disconnected session limit set at 5 minutes.  We strongly recommend keeping this group policy at 5 minutes or change it to another time amount that you want.  We don’t enable a default policy to log off “idle” sessions after X period of time but it is recommended that you enable this at X hours or X days.

To see detail on each users session (how long it has been active, if disconnected or idle, etc.), you can open a command prompt and type in “quser” which will show each user with session stats.

We haven’t seen this happen very frequently, but if a user logs on to the server and the screen remains black, it is likely because the user has an existing disconnected session that has not be fully logged off. To resolve this, log into the server as an Administrator and log off the User’s disconnected session.  When the User logs in again, they should see their full desktop session without any issues.

Steps to view and log off users:

  1. Login as Administrator or account with administrator rights
  2. Open Task Manager by right clicking the bottom tool bar
  3. Click on “More” or “Detail” to view all tabs of Task Manager
  4. Go to the “Users” tab which will show the users that are logged on the server
  5. Right click on a username and select “Log Off”
  6. What happens if I disconnect user in Task Manager

We recommend that users be educated to log off from the server when their tasks are completed (start, click on username, select log-off or sign-off) instead of just disconnecting the session by clicking the X in the upper right corner which doesn’t log the user off and only disconnects the session.

  • Tags Log off users, remote desktop hosting

What does disconnect mean in Task Manager?

Disconnect – Leaves the session running on the remote computer or server. You can reconnect to the remote computer or server and resume the session. This is good if switching computers or if you are running a time consuming task , you can start the task and disconnect from the session.

What is the difference between disconnect and log off?

If you disconnect from a remote desktop without logging out, applications in the remote desktop might remain open. You can also disconnect from a server and leave published applications running. You can log out from a remote desktop even if you do not have the remote desktop open.

What is Qwinsta?

Displays information about sessions on a Remote Desktop Session Host server. The list includes information not only about active sessions but also about other sessions that the server runs. Note. This command is the same as the query session command.