How to Remotely Log Off Windows Users

by Robert Allen

In this guide, you will learn how to log off users from remote computers.

Users will often forget to sign out of their computers. This can be a problem if you need to reboot the computer or perform maintenance on it.

The good news is there is a built-in Windows command that can log off the users on a remote computer. These steps will work on Windows 10, 11, and Server OS versions.

Let’s check it out.

Step 1. Check Who is Logged on the Remote Computer

First, you need to use the quser command to see who is logged onto the computer and also get their session ID number. Open the command prompt and run the below command. Change pc1 to your target computer.

quser /server:pc1

The above command will get all logged on users from pc1.

In the screenshot above, you can see user “adam.reed” and “robert.allen.da” is logged into PC1. Robert is disconnected and adam is Active. I’ll take note of the user’s ID numbers (1 and 2).

Step 2. Use The Logoff Command

Now that we have the session IDs we can use the logoff command to log out the users on the remote computer.

Logoff 1 /server:pc1

The above command will log off the user with session ID 1 from pc1.

Note: Even though the command has the /server switch it will work with client operating systems like Windows 10 and 11. In this example, pc1 is a windows 10 computer.

Now, if I run the quser command you will see adam.reed is no longer logged in.

Related Content

How to Check Windows Server Uptime

Run PowerShell command on Remote Computer

Recommended Tools

  • AD Cleanup Tool - Find stale and inactive user and computer accounts in Active Directory. Export, disable, move or delete the stale accounts to increase security.
  • AD User Creation Tool - Bulk import or update Active Directory user accounts. Add users to groups, import into OUs, set multiple attributes and more.
  • NTFS Permissions Tool - Scan and audit NTFS folder permissions. See which users and groups have access to what.
  • AD Reporting Tool - Over 200 reports on users, computers, groups, OUs and more. Customize reports or create your own reports with the report builder.

Leave a Comment