CmdID

CmdID / Commands

tsdiscon

Disconnects a session from a Remote Desktop Session Host server. Windows commands reference

On Windows File tsdiscon.exe

Opens CmdID with your command. It is read in your browser and sent nowhere.

Windows

from the Windows commands reference, CC BY 4.0

Disconnects a session from a Remote Desktop Session Host server. If you don't specify a session ID or session name, this command disconnects the current session. IMPORTANT: You must have Full Control access permission or Disconnect special access permission to disconnect another user from a session. NOTE: To find out what's new in the latest version, see What's New in Remote Desktop Services in Windows Server.

tsdiscon [<sessionID> | <sessionname>] [/server:<servername>] [/v]

To disconnect the current session, type

tsdisconIdentify

To disconnect Session 10, type

tsdiscon 10Identify

To disconnect the session named TERM04, type

tsdiscon TERM04Identify
<sessionID>Specifies the ID of the session to disconnect.
<sessionname>Specifies the name of the session to disconnect.
/server:<servername>Specifies the terminal server that contains the session that you want to disconnect. Otherwise, the current Remote Desktop Session Host server is used. This parameter is required only if you run the tsdiscon command from a remote server.
/vDisplays information about the actions being performed.
/?Displays help at the command prompt.