|
|
|||
|
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 Related Topics
Troubleshooting terminal server issues
Terminal Services client disconnected
|
|
|
This web is provided "AS IS" with no warranties.
Copyright © 2002-2018
ChicagoTech.net,
All rights reserved. Unauthorized reproduction forbidden.