Tracking Who's Logged On

When you deploy Terminal Services, you can use the Terminal Services Manager to view and manage logon sessions. With Remote Desktop for Administration, you can use this as well, but you typically don't need all the additional options and details. A more basic way to keep track of who is logged on to a server is to use the QUSER command. Type quser to see who is logged on to the system on which you are running the command prompt, or type quser /server:ServerName to see who is logged on to a remote server. Consider the following example:

USERNAME  SESSIONNAME  ID  STATEIDLE TIME  LOGON TIME
wrstanek  console      0   Active           9/16/2004 1:33 PM
administrator  rdp-tcp#4   1    Active      1    9/16/2004 5:05 PM

Here, there are two active sessions:

  • Wrstanek is logged on to an active console session. The session ID is 0, meaning it is Session 0.

  • Administrator is logged on to an active virtual session. The session ID is 1, meaning it is Session 1.

You can also use the Task Manager to view user sessions. Press Ctrl+Alt+Delete, and then click Task Manager. In the Task Manager dialog box, select the Users tab, as shown in Figure 30-10. Similar details are shown as with the command line. The one useful addition is the name of the client machine from which the connection was established.

View and manage remote sessions from Task Manager.

Figure 30-10. View and manage remote sessions from Task Manager.

You can also use Task Manager to manage remote user sessions:

  • To disconnect a user session, select the user entry, click Disconnect, and then click Yes when prompted to confirm the action.

  • To log off a user, select the user entry, click Logoff, and then click Yes when prompted to confirm the action.

The difference between disconnecting a session and logging off a session is important. When you disconnect a session, the session goes into a disconnected state and continues executing current processes. If you log off a user, you end that user's session, closing any applications the user was running and ending any foreground processes the person was running as well. A foreground process is a process being run by an active application as opposed to a background or batch process being run independently from the user session.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset