How-To

How to Log Off Other Users on Windows 11

User accounts let each person have a unique experience, but when they forget to sign out, you may need to log off other users on Windows 11.

If you have multiple users on the same PC, you may encounter a situation where you need to log off other users on Windows 11. This can be important to keep your computer running its fastest since having other users signed in can slow down your PC’s responsiveness.

For example, another user may forget to log out of their session. So, the session will continue to run and take up unnecessary system resources, which can make your experience sluggish.

When you add user accounts on a single PC, it allows each person to have their own settings, files, data, and apps. However, if they forget to sign out, this can affect performance and power usage.

The good news is that you can log off other users without signing out of your admin account by using Task Manager or running a few commands. We’ll show you how to do it in this guide.

Log Off Other Users from Task Manager

One straightforward way to log off other users on Windows 11 is from Task Manager.

  1. Right-click an empty area on the taskbar and select Task Manager from the menu. Alternatively, you can use the Ctrl+Shift+Esc keyboard shortcut to open the utility directly.Task Manager Windows 11
  2. Click the Navigation menu button in the top left corner and choose Users from the menu.users task manager windows 11
  3. Right-click the user account you want to log off and click Sign off from the menu that appears.Log Off Other Users on Windows 11
  4. Click the Sign out user button when the verification message appears.Log Off Other Users on Windows 11

Once you complete the steps, the user will be logged off. Note that it may take a few seconds while open apps and processes are closed during the sign-out process. If other users are still signed in, repeat the above steps to log them off.

Log Off Other Users on Windows 11 via Command Prompt

While logging off other users from Task Manager is straightforward, you might prefer to do your computing from the command line. If so, this section will look at logging off other users from the Command Prompt.

  1. Press the Windows key to open the Start menu.
  2. Type CMD, right-click Command Prompt, and select the Run as Administrator option from the menu that appears.run command prompt as administrator
  3. Run the following command to query the currently signed-in users and the user ID:
    query session
  4. Type the following command to sign out the other user where you replace “ID-Number” with the account you want to log off:
    logoff ID-Number

    Log Off Other Users on Windows 11

So, in our example, we’re logging off Sarah’s account by typing logoff 6 and pressing Enter. That’s all there is to it. Note that Windows doesn’t display any sort of notification message when the command is complete.

Log Off Other Users Using PowerShell

Continuing along the command line route, we’ll show you the commands to run to sign out users from PowerShell.

  1. Press the Windows key to open the Start menu.
  2. Type PowerShell, right-click the top result, and select the Run as Administrator option from the context menu.launch powershell as admin
  3. Run the following command to verify current signed-in users and user ID:
    query session

    powershell query

  4. Run the following command to get the name of your computer:
    hostname

    query powershell hostname

  5. Now that you have the necessary data queried, you can run the following command where you replace “Computer_Name” with the hostname and “User_Name” with the user you want to sign out:
    $sessionID = ((quser /server:'Computer_Name' | Where-Object { $_ -match 'User_Name' }) -split ' +')[2]
  6. So, in our example, we enter the following to log off a user’s account from our PC:
    $sessionID = ((quser /server:'XPS_13' | Where-Object { $_ -match 'Sarah' }) -split ' +')[2]

    Log Off Other Users on Windows 11

Logging Off User Accounts on Windows 11

If you have a shared computer, sometimes people forget to log out when they finish their session. This can cause unwanted system resource usage that leads to a sluggish experience for you.

Luckily, you can log off other users with a few clicks in Task Manager or by running a few commands from the command line environment.

Click to comment

Leave a Reply

Your email address will not be published.

 

To Top