Occasionally there may be a need to force logoff a user from a remote workstation. Here’s how to do that:
- Open a remote shell with PSexec
- Find out who is logged into the system:
query session
- Logoff the user on session #2:
logoff 2
This can be useful in larger office networks as it saves you a trip to the computer in question if you’re on a different floor, and this works for both workgroup and domain environments.