Log Off Another User in Windows
Views (6153)
To Log Off Another User in Windows 10,
- Open the Task Manager app.
- If it looks as follows, switch it to the full view using the "More details" link in the bottom right corner.
- Click on the Users tab.
- Right-click on a user account you want to log off.
- Select Sign off from the context menu.
You are done.
Alternatively, there are a couple of console tools we can use for the same purpose. Let's review them.
Log Off Another User from the Command Prompt
- Open an elevated command prompt.
- Type or copy-paste the following command:
query session. This will list available user sessions. - Note the ID column value for the user you want to sign off.
- Now, execute the command
logoff <ID>. For example,logoff 1.
You are done.
Finally, you can use PowerShell, as follows.
Log Off Another User from with PowerShell
- Open PowerShell as Administrator.Tip: You can add "Open PowerShell As Administrator" context menu.
- Type or copy-paste the following command:
$sessionID = ((quser /server:'you computer name' | Where-Object { $_ -match 'user name to sign off' }) -split ' +')[2] - Now, execute the command
logoff $sessionID.
The PowerShell method is great when you know the exact user name. You can save it as a script and sign out other users with one click when needed.
That's it.
https://winaero.com/log-off-another-user-in-windows-10/

Like
Report
*This post is locked for comments