Command line finesse is an indicator of an administrator's competency. Learn some of the commands terminal services on Windows Server 2008 that are handy for troubleshooting.
The Windows Terminal Server platform is a very versatile environment for remote administration and for user access. The tools in Windows to monitor terminal services are good, but if a number of tasks need to be performed; the console tools can be rather clunky.
Windows provides a number of command line tools to gather information on active terminal services operations. TechNet has these command enumerated for use on Windows Server 2008 and Windows 7 systems in the Terminal Server Command Line reference. This resource has a number of commands identified for terminal services tasks.One command that can quickly provide terminal services information on active sessions on a server is the quser or the query user command, which shows who is connected and their state. Both of these commands with the same results are shown in Figure A. Figure A
Click the image to enlarge.Another handy task is to reset a session on a terminal server possibly for an idled session or a locked up user; this can be done with the reset session command. A remote server can be specified in the command as well. Figure B shows session ID 2 being removed from a remote server named FA4. Figure B
Click the image to enlarge.
Another handy tool is the tskill utility, which allows a task to be killed on a remote server within a terminal session; this is very beneficial to preserve user password integrity. The msg command can also pass information to a session to inform a user to log out for maintenance.
In each of these cases, the command line options will save you time compared to performing equivalent tasks within tools such as the Remote Desktop Services Manager or Remote Desktop Session Host Configuration.
Have you leveraged these command line tools to support or troubleshoot terminal servers? Share your comments and strategies.