TSDISCON Windows Command Guide
The Windows tsdiscon command is used to disconnect a Remote Desktop Session. This command is helpful for managing sessions remotely and can be particularly useful in environments where multiple users are connecting to a single machine. By using tsdiscon, you can quickly disconnect sessions without logging off the user, allowing them to resume their work later.
TSDISCON Syntax:
Section titled “TSDISCON Syntax:”tsdiscon
Options:
Section titled “Options:”Option | Description |
---|---|
None | Disconnect the current session |
Parameters:
Section titled “Parameters:”Parameter | Description |
---|---|
None | No parameters for this command |
TSDISCON Command Samples:
Section titled “TSDISCON Command Samples:”Disconnect the Remote Desktop Session for a Specific User
Section titled “Disconnect the Remote Desktop Session for a Specific User”tsdiscon /server:192.168.1.5 /v:USERNAME
Disconnects the remote desktop session for a specific user named “USERNAME” on the server with IP address “192.168.1.5”.
Disconnect the Current User from the Remote Desktop Session
Section titled “Disconnect the Current User from the Remote Desktop Session”tsdiscon
Disconnects the current user from the remote desktop session they are logged into.
Disconnect a Remote Desktop Session by Session ID
Section titled “Disconnect a Remote Desktop Session by Session ID”tsdiscon /id:2
Disconnects the remote desktop session with the specified Session ID, in this case, Session ID 2.
Disconnect a User from a Remote Server
Section titled “Disconnect a User from a Remote Server”tsdiscon /server:192.168.1.10 /v:USERNAME
Disconnects the user named “USERNAME” from a remote server with the IP address “192.168.1.10”.
Disconnect All Remote Desktop Sessions
Section titled “Disconnect All Remote Desktop Sessions”tsdiscon /server:192.168.1.20 /dest:*
Disconnects all remote desktop sessions on the server with the IP address “192.168.1.20”.
Disconnect a Specific User from the Current Remote Desktop Session
Section titled “Disconnect a Specific User from the Current Remote Desktop Session”tsdiscon /v:USERNAME
Disconnects the specified user named “USERNAME” from the current remote desktop session.
Disconnect a User from a Remote Desktop Session with a Specific Session ID
Section titled “Disconnect a User from a Remote Desktop Session with a Specific Session ID”tsdiscon /id:3 /v:USERNAME
Disconnects the user named “USERNAME” from the remote desktop session with the Session ID of 3.
TSDISCON FAQ:
Section titled “TSDISCON FAQ:”How do I use tsdiscon in Windows?
Section titled “How do I use tsdiscon in Windows?”To use the tsdiscon command in Windows, execute the following command:
tsdiscon
What is the purpose of the tsdiscon command?
Section titled “What is the purpose of the tsdiscon command?”The tsdiscon command is used to disconnect a Remote Desktop Session Host (RD Session Host) session.
How can I disconnect a specific session using tsdiscon?
Section titled “How can I disconnect a specific session using tsdiscon?”To disconnect a specific session, you can specify the session ID in the tsdiscon command. For example:
tsdiscon <sessionID>
Can I use tsdiscon without specifying a session ID?
Section titled “Can I use tsdiscon without specifying a session ID?”Yes, you can use tsdiscon without specifying a session ID to disconnect the current session.
Is it possible to force log off a user using tsdiscon?
Section titled “Is it possible to force log off a user using tsdiscon?”No, the tsdiscon command is used for disconnecting a session, not for forcing a log off. To force log off a user, you can consider using the logoff command.
How do I get more information about the tsdiscon command and its options?
Section titled “How do I get more information about the tsdiscon command and its options?”You can get more information about the tsdiscon command and its options by using the /? option. Simply run:
tsdiscon /?
Applications of the TSDISCON Command
Section titled “Applications of the TSDISCON Command”- Disconnect a Remote Desktop Session
- Log off a user from a Remote Desktop Session