Another couple of weeks has gone by, so time for me to say something else about Server Core. This week I'll mention a few Terminal Services tips and tricks.

 

When using Terminal Services, without the GUI shell some common tasks require you to do things a little differently.

 

Logging off of a Terminal Services session

On Server Core, there is no Start button so no GUI option to logoff. Clicking the X in the corner of the window will disconnect your session, but the session will still be on the box. To logoff, you need to use the Terminal Services logoff command. While in your Terminal Services session you simply run: logoff. If you disconnect your session, you can either reconnect and use logoff, use the logoff command remotely, or use the Terminal Services MMC to logoff the session.

 

Restarting the Command Prompt

When logged on locally, if you accidentally close the Command Prompt you can either logoff and on, or press ctrl+alt+del, start Task Manager (or just press ctrl+shift+esc), click file, run and run cmd.exe to restart it. In a Terminal Services session, you can use the above commands to logoff and then reconnect and log back on. You can also configure the Terminal Services client to have the windows keys pass to the remote session when not maximized so you can use ctrl+shift+esc to start task manager and run cmd.exe.

 

Working with Terminal Services Sessions

If you ever need to manage Terminal Services sessions from the command line, the query command is the tool you need. Running query sessions (which can also be used remotely) will tell you what Terminal Services sessions are active on the box as well as who is logged into them. This is handy if you need to restart the box.

 

Query has some other useful options and there are a variety of other Terminal Services command line tools, most of which can be found by running dir \windows\system32\ts*.*.

 

See you in a couple of weeks,

 

Andrew