Remotely Log Off User in Windows

Updated

How to remotely log off windows users

Need to log off a user from a remote computer? In this guide, I’ll show you how to use the quser and logoff commands to find active sessions and log off users remotely.

How to Remotely Log Off User

Step 1. To log off a remote user, you first need to find their session ID. Run the quser command against the remote computer. This returns a list of all active sessions with the username, session ID, and session state. Find the user you want to log off and note the session ID.

quser /server:pc1
quser output listing the sessions and session IDs on a remote computer

Step 2. Run the logoff command with the session ID and server name. Replace 1 with the actual session ID from the quser output. The user will be logged off immediately and any unsaved work will be lost, so use this with caution.

Logoff 1 /server:pc1
logoff command run against a session ID on the remote computer

Log Off Multiple Users

The AD Pro Toolkit lets you log off multiple users from remote computers without running commands. Select the computers, view all active sessions, and log off users individually or in bulk. You can also filter by session state to find disconnected sessions that are still consuming resources on your servers.

Download Free Trial

Toolkit listing active sessions across computers with a log off option

Related Content