Windows Server 2008 Server Core : Working with Terminal Server (part 2)
4. Terminating a Session with the Reset Utility
Use this utility to reset a session. In this case, the system disconnects the user from the system and receives a message to that effect. If you simply want to reset the session to a known good state, use the RWinSta utility instead. This utility uses the following syntax:
RESET [sessionname | sessionid] [/server:server_name] /v
Notice that you may only specify one of the session identifiers. If you provide a session name, then you can't provide a session identifier as well. The following list describes each of the command line arguments.
sessionname
Specifies the name of the session to reset.
sessionid
Specifies the numeric identifier of the session to reset.
/SERVER:
servernameSpecifies the terminal server to reset. The default is the current server.
/v
Displays additional information about every action that the utility takes to reset the session. This information varies by session.
5. Resetting the Hardware and Software with the RWinSta Utility
This utility resets the subsystem hardware and software to a known state. You use it when a session has experienced non-recoverable errors. It's the same as running the RESET SESSION command from within Terminal Services. This utility uses the following syntax:
RWinSta {sessionname | sessionid} [/SERVER:servername] [/V]Notice that you may only specify one of the session identifiers. If you provide a session name, then you can't provide a session identifier as well. The following list describes each of the command line arguments.
sessionname
Specifies the name of the session to reset.
sessionid
Specifies the numeric identifier of the session to reset.
/SERVER:
servernameSpecifies the terminal server to reset. The default is the current server.
/V
Displays additional information about every action that the utility takes to reset the session. This information varies by session.
6. Monitoring Other Sessions with the Shadow Utility
Use this utility to monitor another Terminal Server session. This utility uses the following syntax:
SHADOW {sessionname | sessionid} [/SERVER:servername] [/V]Notice that you may only specify one of the session identifiers. If you provide a session name, then you can't provide a session identifier as well. The following list describes each of the command line arguments.
sessionname
Specifies the name of the session to monitor.
sessionid
Specifies the numeric identifier of the session to monitor.
/SERVER:
servernameSpecifies the terminal server to monitor. The default is the current server.
/V
Displays additional information about every action that the utility takes to monitor the session. This information varies by session.
7. Attaching a User Session with the TSCon Utility
Use this utility to attach a user session to an existing Terminal Server session. This utility uses the following syntax:
TSCON {sessionid | sessionname} [/DEST:sessionname] [/PASSWORD:pw] [/V]Notice that you may only specify one of the session identifiers. If you provide a session name, then you can't provide a session identifier as well. The following list describes each of the command line arguments.
sessionname
Specifies the name of the session to monitor.
sessionid
Specifies the numeric identifier of the session to monitor.
/DEST:
sessionnameConnects the current user session to the specified destination Terminal Service session.
/PASSWORD:
pwSpecifies the password of the user who owns the identified session.
/V
Displays additional information about every action that the utility takes to connect to the Terminal Services session. This information varies by session.
8. Disconnecting an Active Session with the TSDiscon Utility
Use this utility to disconnect from an existing Terminal Services session. The Terminal Services session continues to run after you disconnect from it. This utility uses the following syntax:
TSDISCON [sessionid | sessionname] [/SERVER:servername] [/V]
Notice that you may only specify one of the session identifiers. If you provide a session name, then you can't provide a session identifier as well. The following list describes each of the command line arguments.
sessionname
Specifies the name of the session to disconnect.
sessionid
Specifies the numeric identifier of the session to disconnect.
/SERVER:
servernameSpecifies the terminal server to disconnect from. The default is the current server.
/V
Displays additional information about every action that the utility takes to disconnect from the session. This information varies by session.
9. Ending Processes with the TSKill Utility
Use this utility to end a Terminal Services process. This utility uses the following syntax:
TSKILL processid | processname [/SERVER:servername] [/ID:sessionid | /A] [/V]Notice that you may only specify one of the process identifiers. If you provide a process name, then you can't provide a process identifier as well. The following list describes each of the command line arguments.
processid
Specifies the numeric identifier of the process to terminate.
processname
Specifies the name of the process to terminate.
/SERVER:
servernameIdentifies the server that is running the process. The default setting is the current server. You must include either the /ID or /A command line switch when using this command line switch and a process name to terminate a session.
/ID:
sessionidIdentifies the session under which the process is running.
/A
Ends this process for all sessions.
/V
Displays detailed information about the processes that the utility terminates.
10. Shutting Down Terminal Server with the TSShutDn Utility
Use this utility to shut down Terminal Server in a controlled manner. The users receive a message stating the server shutdown time. In addition, you can use this utility to reboot the server. For some odd reason, Vista doesn't support this utility and Microsoft doesn't provide an alternative. This utility uses the following syntax:
TSSHUTDN [wait_time] [/SERVER:servername] [/REBOOT] [/POWERDOWN]
[/DELAY:logoffdelay] [/V]
The following list describes each of the command line arguments.
wait_time
Determines the number of seconds the system waits after user notification to terminate all user sessions and shut down the Terminal Server. The default setting is 60 seconds.
/SERVER:
servernameSpecifies the name of the server to shut down. The default setting shuts down the current server.
/REBOOT
Reboots the server after all the user sessions terminate. The server restarts and ends up in a known good state.
/POWERDOWN
Powers the Terminal Server down. The host system remains running.
/DELAY:
logoffdelaySpecifies the number of seconds to wait after logging off all connected sessions. The delay provides time for applications to complete any required tasks. The default setting is 30 seconds.
/V
Displays detailed information about all of the actions the utility performs to shut down the. Terminal Server.