WiseCleaner Think Tank

Encounter difficult computer problems?
All about maintenance and optimization of your Windows System.

Home > Think Tank > How to Sign Out Other Users on Windows 11

How to Sign Out Other Users on Windows 11

Dec 28, 2023

How many users staying signed in to your Windows 11? And how to sign out them from your account to save system resources? Follow this article, and you will get the answer.

Sometimes, you may share your computer with others, allowing them to create an account to keep their files, settings, programs, etc. But each active user session on your PC means your computer's resources are shared with others, which can impact system performance to some degree. Therefore, it is necessary to sign off the idle users or superfluous accounts.

This post will show you three different ways to manually sign out other users on your Windows 11.

Method 1. Sign out other users via Task Manager

This method could be much simpler because Task Manager keeps track of the user’s account. Users can sign off or switch accounts within several clicks.

Step 1. Open Task Manager

Put the cursor in the blank area of the Taskbar and right-click to select Task Manager.

Step 2. Sign off other users

In the Task Manager window, click on the Users tab, then you can see all the users on your computer. Tap on one account that you want to log off, right-click on it then select Sign off.

3. Click the Sign out user button.

Tap on the Sign out user button in the pop-up window. Once you complete the steps, the system will sign out the users and terminate that specific session.

Method 2. Sign off other users from the Command Prompt

In addition to Task Manager, you can also use Command Prompt's "query sessions" command to check and log off other user accounts.

Step 1. Open the Command Prompt

Press the Win key, type in cmd to search, and click on Run as administrator to open the Command Prompt.

Step 2. Find the current users

Type the following command and press Enter to view all active user sessions on your computer.

query session

The output result will show you the current users, including their names, IDs, and state.

Step 3. Sign off unnecessary user accounts

Type the following command to sign out the other users and press Enter.

logoff ID-Number

The ID-Number should be replaced with the account you want to sign off. For instance, if you want to sign out the account wq, then you should type the command as logoff 2 and press enter to go on.

There is no notification if the command is completed, and you can check if it is logged off from the Task Manager’s Users tab.

Method 3. Log off other users through PowerShell

Users can also sign out other users by using PowerShell. And the steps are not complicated.

Step 1. Open PowerShell

Press Win + S to open the search window, type in PowerShell to run, and select Run as Administrator to open PowerShell.

Step 2. Check the user accounts and your computer’s name

Type the following command and press Enter, then it will list all the accounts on your computer.

query session

Keep typing the command below and press Enter, then your computer’s name will come out.

hostname

Step 3. Log off other users

Type the following command and press Enter.

$sessionID = ((quser /server:'Computer_Name' | Where-Object { $_ -match 'User_Name' }) -split ' +')[2]

In this command, you need to replace the Computer_Name and User_Name with your computer’s name and the user name respectively. For example, in the previous picture, the computer name is DESKTOP-GVJNFIP, and the user name is YNZQTECH-05, the command should be like this:

$sessionID = ((quser /server:'DESKTOP-GVJNFIP' | Where-Object { $_ -match 'YNZQTECH-05' }) -split ' +')[2]

Once you complete the steps, the PowerShell command will sign the user out of the Windows system.

Conclusion:

As the above methods show, signing off other users from Task Manager will be easier. Logging off redundant users in your system is a good thing because it can free up the computer's resources. Last but not least, when you log off other users, any unsaved work in their accounts will be lost. So do consider that before you apply the above methods.

00