Home | Troubleshooting |  Quick Setup  |  Cisco How to  |  Data Recovery  |  Forums   | Blog | IT Exam Practice | Services  | About Us | Chicagotech MVP  | Search  | Contact Us  |                  Laptop for rent: $35 per day plus $10 for additional day

rental
 

 

How to manage Terminal Services through commend-line tools

Nuo Yan

Terminal Services not only can be managed through Graphical User Interface (Terminal Services Manager MMC), but can also be managed through command line tools. In some cases, command line tools would help systems administrators a lot for increasing the administrative efficiency. In this article, I will mention some of the most useful command line tools for administering Terminal Services. Be aware that Windows Server 2003 provides a lot more command line tools for Terminal Services for more advanced use.

To start command prompt, click “Start”, click “Run”, and enter “cmd”. All of the following operations should be performed in the command prompt. For any commend line tool, we could view help for syntax information by adding “/?” parameter. For example, to view syntax information of “dir.exe”, we could enter “dir.exe /?”. As the result, in this article I will only mention how to use the commend line tools, but not the syntax.

1. Connecting to another terminal session

2. Disconnecting from another terminal session

3. Logging off a terminal session

4. Resetting a terminal session

5. Sending messages to terminal users

6. Shutting down the terminal server

7. Querying terminal session information

8. Killing a specific process on a terminal session

1. Connecting to another terminal session

TSCON.exe

To use TSCON, we should provide the session id or name, destination session id, and password as parameters.

2. Disconnecting from another terminal session

TSDISCON.exe

To use TSDISCON, we should provide session id or name, and specify the terminal server name of the session we wants to disconnect from as parameters.

3. Logging off a terminal session

LOGOFF.exe

To use LOGOFF to log off a terminal session, we should provide session id or name and server name as parameters.

4. Resetting a terminal session

RESET SESSION

To use RESET SESSION, we should provide session id or name and server name as parameters.

5. Sending messages to terminal users

MSG.exe

To send a message to a user on a specific server, we use:

msg “username” /server: “servername”  “message”

We can also send a message to a specific session:

msg “sessionname” “message”

6. Shutting down the terminal server

TSSHUTDN.exe

There is a wait_time parameter for TSSHUTDN.exe, which is really useful. Don’t terminate users’ session immediately. Set wait_time to 60 – 90 seconds will allow users to save their work. Default value is 60 seconds. REBOOT and POWERDOWN parameters are also very useful as REBOOT will reboot the server after shutting down, POWERDOWN will prepare the server to power off.

7. Querying terminal session information

QUERY.exe is a powerful command can be used to query process, session, terminal servers, and user.

a) query process

This option displays information of all or specific processes by session. The user can specify process id, session id or name as parameters.

b) query session

This option displays information of all sessions on a terminal server.

c) query termserver

This option displays information of terminal servers in the domain.

d) query user

This option displays information of users currently logged on to terminal sessions.

8. Killing a specific process on a terminal session

TSKILL.exe

This command kills specific process on a terminal session. For example, by entering TSKILL processid it will kill the process with the specific process id; by entering TSKILL processname it will kill the process with the specific process name. The SERVER parameter can be used to specify to kill the process on a specific server. The ID parameter can be used to specify a specific session.

Post your questions, comments, feedbacks and suggestions

Contact a consultant

Related Topics

Terminal Service

To initiate a Remote Control session: run a Terminal Server Client session to the Terminal ... When the session is running, start Terminal Services Manager. ...
www.howtonetworking.com/server/ts.htm

How to Use TS Manager

Terminal Services Manager not only can do basic administrative operations on ... Figure 1 shows the main MMC interface of Terminal Services Manager. ...
www.howtonetworking.com/RemoteAccess/tsmanager.htm
 

Troubleshooting terminal server issues

"No Terminal Services licensing server is available in the current domain or ... SYMPTOMS: After a TS client loses the connection to a Terminal Server, ...
www.chicagotech.net/troubleshootingts.htm

Terminal Services client disconnected

The Terminal server has ended the connection. The client could not connect to the Terminal server. The server may be too busy. Please try connecting later. ...
www.chicagotech.net/remoteissues/eventid52.htm

Remote Desktop

This file contains the setup for the Terminal Client Software (Remote Desktop ... You can run this file to install the new terminal services client to ...
www.chicagotech.net/rdesktop.htm


 

 


 

 

Hit Counter   This web is provided "AS IS" with no warranties.
Copyright © 2002-2018 ChicagoTech.net, All rights reserved. Unauthorized reproduction forbidden.