Applies To: Windows Server 2008, Windows Server 2008 R2, Windows Vista

Disconnects a session from a Remote Desktop Session Host (RD Session Host) server.

For examples of how to use this command, see Examples.


In Windows Server 2008 R2, Terminal Services was renamed Remote Desktop Services. To find out what's new in this version, see What’s New in Remote Desktop Services on the Windows Server TechCenter.


tsdiscon [<SessionID> | <SessionName>] [/server:<ServerName>] [/v]


Parameter Description


Specifies the ID of the session to disconnect.


Specifies the name of the session to disconnect.


Specifies the terminal server that contains the session that you want to disconnect. Otherwise, the current RD Session Host server is used.


Displays information about the actions being performed.


Displays 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.


  • To disconnect the current session, type:

  • To disconnect session 10, type:

    tsdiscon 10
  • To disconnect the session named TERM04, type:

    tsdiscon TERM04

Additional references

Command-Line Syntax Key

Remote Desktop Services (Terminal Services) Command Reference