When you use the TSDICON command to disconnect an active Terminal Services session, the session remains attached to the Terminal Services server, but in a disconnected state. Programs that were running remain running. You can subsequently reconnect to the same session and resume work without loss of data in the running programs.

When you type tsdiscon /?, you receive:

Disconnects a terminal session.

<b>TSDISCON \[sessionid | sessionname\] \[/SERVER:servername\] \[/V\]</b>

  <b>sessionid</b>           The ID of the session.
  <b>sessionname</b>         The name of the session.
  <b>/SERVER:servername</b>  Specifies the Terminal server (default is current).
  <b>/V</b>                  Displays information about the actions performed.
NOTE: You cannot disconnect the console session.

NOTE: To disconnect another user's session, Full Control permission is required.

Example:

To disconnect a session on the current Terminal Services server:

1. Open a CMD prompt.

2. Type query session. You will receive a display like:

SESSIONNAME   USERNAME        ID      STATE    TYPE    DEVICE
 console      administrator       0   active   wdcon  
 rdp-tcp                      65536   listen   rdpwd
>rdp-tcp#1    user1               1   active   rdpwd
 rdp-tcp#2    user1               2   active   rdpwd
 rdp-tcp#3    user2               3   active   rdpwd
 rdp-tcp#4    user3               4   disc     rdpwd  
 rdp-tcp#5    user1               5   active   rdpwd
                                  6   idle
                                  7  idle
where rdp-tcp#1 is the current session, session ID 1, owned by user1.

3. To disconnect the current session, type tsdiscon. To disconnect session ID 2, type tsdiscon 2 /v, which will display Disconnecting sessionID 2 from sessionname rdp-tcp#2. To disconnection rdp-tcp#5, type tsdiscon rdp-tcp#5.

NOTE: See How do I connect to another existing Terminal Services session by using the TSCON command in Windows 2000 Terminal Services?