Disconnect a Remote Desktop Session.
Syntax tsdiscon [SessionID | SessionName] [/server:ServerName] [/v] Key SessionId The ID of the session to disconnect. SessionName The name of the session to disconnect. ServerName The terminal server containING the session to disconnect. Default=the current RD Session Host server. /v Display verbose information. /? Display help at the command prompt.
You must have Full Control permission or Disconnect special access permission to disconnect another user from a session.
If no session ID or session name is specified, tsdiscon disconnects the current session. Any applications that were running when you disconnected the session are automatically running when you reconnect to that session with no loss of data.
Use reset session to end the running applications of the disconnected session, but be aware that this might result in loss of data at the session. The /server parameter is required only if you use tsdiscon from a remote server. The console session cannot be disconnected.
Disconnect the current session:
Disconnect session 10:
C:\> tsdiscon 10
Disconnect the session named TERM64:
C:\> tsdiscon TERM64
“One final paragraph of advice: Do not burn yourselves out. Be as I am - a reluctant enthusiast…a part time crusader, a half-hearted fanatic. Save the other half of yourselves and your lives for pleasure and adventure. It is not enough to fight for the land; it is even more important to enjoy it. While you can. While it’s still here.” ~ Edward Abbey
MSTSC - Terminal Server Connection (Remote Desktop Protocol).
QUERY session - List TS sessions.
Q321705 - Disconnect a TS Session using TSDISCON.
SuperUser - Display User Selection screen instead of lock screen after screensaver inactivity.