Mohammedz.com

For Linux and Shell scripting.

How to kill or disconnect a terminal session in Windows 2000 servers.

2 Comments


To disconnect a session, you can use the command tsdiscon.
tsdiscon SessionID | SessionName [/server:ServerName] /v

To kill a disconnected session, you can use the command rwinsta.
rwinsta {sessionname | sessionid} /SERVER:servername

• SessionID: Use this parameter to specify the ID of the session that you want to disconnect. To determine the ID of the session that you want to disconnect, use the query session command.
• SessionName: Use this parameter to specify the name of the session that you want to disconnect. To determine the name of the session that you want to disconnect, use the query session command.
• /server:ServerName: Use this parameter to specify the Terminal Services server that hosts the session that you want to disconnect. If you omit this parameter, the current Terminal Services server is specified.
• /v: Use this parameter to display information about the actions that are being performed.

About these ads

2 thoughts on “How to kill or disconnect a terminal session in Windows 2000 servers.

  1. Great info, saved my day! Thanks!

  2. Thanks Mohammed.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.