SolutionBase: Terminal Services Manager under Windows Server 2003

Learn how to manage Terminal Services on Windows Server 2003 using Terminal Services Manager.

Terminal Services enables users running a Terminal Services client (Remote Desktop Connection) on their computer to initiate a remote session on the Terminal Server. The session and its applications run on the server and the input/output and display occur at the client workstation. Terminal Services Manager provides the interface through which you manage Terminal Servers, client connections, users, and processes. You can use Terminal Services Manager to manage the local Terminal Server, systems in trusted domains, or standalone servers.

Terminal Services Manager in a nutshell
Terminal Services Manager is installed by default when you install Windows Server 2003. You can also run the Terminal Services Manager on a Windows XP workstation by installing the Windows Server 2003 Administration Pack, available from Microsoft's Web site. To install the Administration Pack on Windows XP, you must have installed Service Pack 1 or hot fix QFE Q329357 on the Windows XP Professional computer.

In addition to managing Terminal Servers, users, processes, and sessions, you can also connect to a specific session on the target Terminal Server. For example, let's say you've performed a few management tasks on a server but now need to leave an application running while you work on something else on a different server. You disconnect the session, which leaves the applications running. Later, you decide to check on the status of the applications, so you connect to that session again. In a way, this capability is like Fast User Switching in Windows XP, which enables you to log on with a different account without logging off from the current account. You can switch between sessions on any available Terminal Server. Terminal Services Manager also gives you the capability to remotely control another user's session, which makes it possible to monitor the user or provide assistance with software or other issues.

Terminal Services Manager provides several other capabilities, as well. For example, you can use it to send messages to another user's session, log off a user, reset a session, view session-related counters, and end processes.

Touring Terminal Services Manager
Terminal Services Manager is not an MMC console snap-in, but when you open it, you'll find that it looks a lot like a standard MMC snap-in, as seen in Figure A. The navigation pane at the left of the window shows the local computer by default, a branch that shows all connected servers, and a Favorite Servers branch that enables you to quickly access frequently used servers.

Figure A
The Terminal Services Manager window

The right pane shows information about the item selected in the left pane. For example, when you click a server, the right pane shows a three-tabbed view that displays users, sessions, and processes for that server. If you click the All Listed Servers tab, the right pane shows these same three tabs, but for all servers.

Figure B
You can easily view all users, processes, and sessions for all listed servers.

The Users tab, shown in Figure B, includes the following columns:
  • Server—This column lists the server on which the specified user's session is running. This column does not appear if you click a server in the left pane, but does appear if you click the All Listed Servers branch.
  • User—This column shows the user who is logged onto the specified session.
  • Session—This column lists the session names. The Console session is the system console session (the session to which you would log on locally to the target computer).
  • ID—This column shows the numeric ID of the session. The Console session is always session 0.
  • State—This column shows the session's state. I discuss the different states later in this article.
  • Idle Time—This columns shows the number of minutes that have passed without keyboard or mouse input to the session.
  • Logon Time—This column shows the time the user logged on to the session.

The Sessions tab (Figure C) shows much of the same information as the Users tab but organizes the information by session and shows additional session-specific information.

Figure C
The Sessions tab shows information about sessions on the target server (or on all servers).

These additional columns include:
  • Type—The Type column identifies the client session type, such as Console or Microsoft RDP.
  • Client Name—This column shows the client computer name from which the session was initiated.
  • Comment—This column shows an optional comment for the session.

The Processes tab (Figure D) shows all processes running on the selected server, or on all servers if you click the All Listed Servers branch.

Figure D
Use the Processes tab to view the processes running on a target server or on all servers.

The Process tab includes some of the same information as found on the Users and Sessions tab, with the following additional columns:

PID—This column displays the process ID (PID) of the specified process. The PID uniquely identifies the process.

Image—This column shows the executable program that created the process.

Viewing all processes on the server can be confusing when you're trying to identify the processes running in a particular session, and the problem only gets worse when you click the All Listed Servers branch. That's not a problem, because you can easily view only the processes running in a particular session. Expand the server in the navigation pane, click the session whose processes you want to view, and those processes appear in the right pane (Figure E). This view shows the session ID, the PID, and the image name.

Figure E
You can view the processes running in a single session.

Session status
Terminal Services Manager offers a couple of ways to view sessions’ status and statistics. First, you can click on a session in the navigation pane and then click the Information tab in the right pane (Figure F). This tab shows a handful of properties for the session including the IP address, hardware properties, and related information. Clicking Help displays a dialog box with explanation about each item.

Figure F
The Information tab shows information about the client associated with the session.

You can also view statistics about the session. Right-click the session in either the navigation pane or the Sessions tab in the right pane and choose Status. Terminal Services Manager displays the Status dialog box shown in Figure G, which shows network I/O information about the session. You can also force a status refresh and reset the counters through this dialog box. The default session status refresh period is one second.

Figure G
You can view network I/O status for a session.

Session states
A given session can be in one of several states, and the State column in the various tabs lists each session's state. The possible states are:
  • Active—This indicates that the session is connected and a user is logged on to the server.
  • Connected—In the Connected state, the session is connected but no user is logged on to the server.
  • ConnectQueryThis indicates that the session is in the process of connecting. If this state persists, there is likely a problem with the session or connection.
  • RemoteControlThe target session is remotely controlling another session.
  • Listen—When a session is in the Listen state, it is ready to accept connections.
  • Disconnected—This state indicates that the user has disconnected from the session but that the session is still active and can be reconnected.
  • Idle—This state indicates that the session is ready to accept connections.
  • Down—This state indicates that the session could not be initialized or terminated.
  • Init—This state indicates that the session is initializing.

Menu and toolbar
The Terminal Services Manager menu should be familiar territory to anyone who has used a typical MMC console or standalone Windows Server management application. The Actions menu lists several commands that are either enabled or dimmed according to the item selected in the navigation pane or details pane. You can also access most of these commands through an item's context menu (right-click) or through the toolbar.

The View menu enables you to show or hide the toolbar and status bar, refresh the display, and expand or collapse the navigation pane contents. Use the Show System Processes command to turn on or off inclusion of system processes in the Processes tab.

The Tools menu offers a single command that opens the Options dialog box, where you set options for Terminal Services Manager (Figure H). You can use this dialog box to configure refresh settings for the Processes list and status dialog boxes.

Figure H
The Options dialog box

The dialog box also offers these additional options:
  • Confirm Actions—When this option is selected, Terminal Services Manager prompts you to confirm certain actions, such as disconnecting a session. Clear this option if you don't want to be prompted for confirmation.
  • Save Settings on Exit—When this option is enabled, Terminal Services Manager saves several properties, such as window location and navigation pane width.
  • Remember Server Connections—Enable this option to have the list of connected servers stored in the registry so they can be automatically reconnected in the next Terminal Services Manager session.

The toolbar, whose buttons dim if the target action is not supported by the selected item, includes the following buttons:
  • Connect
  • Disconnect
  • Send Message
  • Remote Control
  • Reset
  • Status
  • Log Off
  • End Process
  • Refresh Now

Common Tasks
Table A lists common tasks you can accomplish with Terminal Services Manager and explains how to accomplish them.
Table A
Task Action
Connect to a server Expand the domain, locate the server, right-click the server, and choose Connect.
Connect to an unlisted server Right-click All Listed Servers and choose Connect To Computer.
Disconnect from all servers in a domain Right-click the domain and choose Disconnect.
Disconnect from a specific server Right-click the server and choose Disconnect.
Scan for Terminal Servers in the domain Right-click the domain and choose Refresh Servers In Domain.
Scan for Terminal Servers in all domains Right-click All Listed Servers and choose Refresh Servers In All Domains.
Disconnect from all servers in a domain Right-click the domain and choose Disconnect From All Servers.
View users connected to a server Click the server and click the Users tab.
View sessions on a server Click the server and click the Sessions tab.
View processes on a server Click the server and click the Processes tab.
View all users, sessions, or processes for all servers Click All Listed Servers and click the Users, Sessions, or Processes tab.
Add a server to the Favorite Servers branch Right-click the server and choose Add To Favorites.
Send a message to a session Click the session and then click the Send Message toolbar button.
Remotely control a session Click the session and then click Remote Control on the toolbar.
Log off a user Click the Users tab, click the user, and click Log Off on the toolbar.
End a process Click the process on the Processes tab and then click End Process on the toolbar.
View client information Click a session under a server and click the Information tab.
View network statistics Right-click a session and choose Status.