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.
- 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.
- Click the Navigation menu button in the top left corner and choose Users from the menu.
- Right-click the user account you want to log off and click Sign off from the menu that appears.
- Click the Sign out user button when the verification message appears.
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.
- Press the Windows key to open the Start menu.
- Type CMD, right-click Command Prompt, and select the Run as Administrator option from the menu that appears.
- Run the following command to query the currently signed-in users and the user ID:
query session
- 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
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.
- Press the Windows key to open the Start menu.
- Type PowerShell, right-click the top result, and select the Run as Administrator option from the context menu.
- Run the following command to verify current signed-in users and user ID:
query session
- Run the following command to get the name of your computer:
hostname
- 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]
- 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]
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.