Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Possible Duplicate:
how do you disconnect an active user logged in to a box?

how do you disconnect an active user logged in to a box? There should be a command line tool that comes with Windows, but I forgot it's name. It lists all the users logged in to a box and you can force disconnect of some, because, for example, you want to Remote Desktop to it and there's too many users.

share|improve this question

migrated from stackoverflow.com May 26 '10 at 1:02

This question came from our site for professional and enthusiast programmers.

marked as duplicate by Zypher, Warner, John Gardeniers, EEAA, Dennis Williamson May 26 '10 at 4:19

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1  
Shouldn't this be on SuperUser? –  Aren B May 26 '10 at 0:12
1  
or ServerFault. –  Jared Updike May 26 '10 at 0:14
    
Unplug the oversize phone cable! –  JYelton May 26 '10 at 0:21
add comment

3 Answers

qwinsta will list users, rwinsta will disconnect them.

share|improve this answer
add comment

You can run mstsc /console to force Remote Desktop to connect to the console, disconnecting any previous user.

share|improve this answer
add comment

You can use tsdiscon.exe to disconnect a terminal services session or logoff.exe to terminate the session.

tsdiscon.exe disconnects a session from a terminal server. You must have Full Control permission to disconnect another user from a session.

If no session ID or session name is specified, tsdiscon disconnects the current session. The console session cannot be disconnected.

Any applications that were running when you disconnected the session are automatically running when you reconnect to that session with no loss of data.

logoff.exe Logs off a user from a session and deletes the session from the server. You can always log off from the session to which you are currently logged on. You must, however, have Full Control permission to log off users from other sessions.

Logging off a user from a session without warning can result in loss of data at the user’s session. You should send a message to the user using the msg command to warn the user before taking this action.

If no ID or name for the session is specified, logoff logs off the user from the current session. If you specify a session name, it must be an active one.

When you log off a user, all processes end and the session is deleted from the server.

You cannot log off a user from the console session.

Details are here http://technet.microsoft.com/en-us/library/cc776289(WS.10).aspx

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.