Terminal Services - Frequently Asked Windows Terminal Services Questions!

[12] Frequently Asked Asp Questions!
Updated: Jun 07, 2000
[188] Frequently Asked Citrix Questions!
Updated: Oct 10, 2006
[3] Frequently Asked Sco Tarentella Questions!
Updated: Aug 16, 2002
[260] Frequently Asked Windows Terminal Services Questions!
Updated: Aug 03, 2006
[1] 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
My company is willing to start using Terminal Services but I have no clues on how to size a terminal server for the amount of users and applications we are willing to have! How do I know what size terminal server I should buy? 

For Windows 2000 Server, first read the whitepaper written by Microsoft,

Windows 2000 Terminal Services Capacity and Scaling (http://www.microsoft.com/technet/prodtechnol/win2kts/maintain/optimize/w2ktsscl.mspx).

Then get a server with the specs you think will do the task and refer to this article, Terminal Server Capacity Planning Tools for capacity planning (http://technet2.microsoft.com/WindowsServer/en/library/cb201937-8f68-4d0f-9521-99e090ddd6b11033.mspx?mfr=true). To validate your results you can use some load simulation tools and/or scripts and monitor the results using tools like the built-in Performance Monitor.

If you are using Windows Server 2003, refer this Microsoft whitepaper, Windows Server 2003 Terminal Server Capacity and Scaling (http://www.microsoft.com/downloads/details.aspx?FamilyID=a2ae95da-be56-4495-9fb5-e4b7170b33d9&DisplayLang=en), which includes testing methodologies, results, analysis, and sizing guidelines.

Starting with Windows 2003, COM port redirection works. Is there a way to check if my local COM ports are being redirected? 

You can use the CHANGE PORT /QUERY command. Simply start a command prompt window and type the following command:

change port /query

You should see a similar output like this:

AUX = \DosDevices\COM1 
COM1 = \Device\RdpDrPort\;COM1:2\tsclient\COM1
COM2 = \Device\RdpDrPort\;COM2:2\tsclient\COM2
COM3 = \Device\RdpDrPort\;COM3:2\tsclient\COM3
LPT1 = \Device\RdpDrPort\;LPT1:2\tsclient\LPT1
PRN = \DosDevices\LPT1

As seen above all COM ports (1 to 3) are being redirected from session 2 (:2 after the COM port).
If the ports were not being redirected your output would be similar to this:

AUX = \DosDevices\COM1 
COM1 = \Device\Serial0
COM2 = \Device\Serial1
Is there a way to prevent regular users from shutting down a Terminal Server?  

First of all if they are able to do this right now you have more issues than you can imagine. By default only members of the `Administrators` group have such ability. The first step is to make sure they are not part of this group. After checking (and fixing) that, you can also use Group Policies (assuming you are on an Active Directory environment) to remove the Shutdown option on the start menu.

Instead of installing new servers from scratch, assuming I have identical servers, could not I simply image (clone) one of my current terminal servers? 

Technically this is possible BUT it is not recommended. Some companies when dealing with support issues will not support a machine that was built using such method. But yes, it can be done. The easiest way is to simply use a tool like Symantec Ghost to create an image. Make sure you image a server that was preferably removed from the domain and when the image is loaded on the new server, before rebooting the machine to use the image, disconnect it from the network, rename it and use a tool like NewSID (from Sysinternals.com) to change the machine SID. Make sure you change its IP addresses as well. Once you have done that simply connect the machine to the network and join it to the domain.

NOTE: the procedure for cloning Citrix servers is quite different due to the IMA architecture. For the latest article on the subject please check: http://support.citrix.com/article/CTX107406

Is there a way to prevent users from disconnecting their sessions? 
Technically there is no way to completely prevent users from disconnecting their sessions (as they can always unplug the network cable or simply turn off their PCs). Assuming that is not the case why the sessions are being disconnected (if that is the case, user education will be required) there are two possible ways to disconnect your session:

  1. By clicking on the START button and then DISCONNECT. This can be removed using a Group Policy.
  2. By clicking on the close button (right upper corner on the TS Client window). To remove this button please check the article `Customizing the RDP Client` available on this website.
When launching shortcuts residing on remote servers (for example a file server) users are prompted with a warning window that asks if they want to download the file. Why is this happening and how can I fix that? 

Starting with Windows 2003 Microsoft released and enabled by default the Internet Explorer Enhanced Security to restricts access to scripts, executable files and other potentially unsafe files on a UNC path unless the UNC path is added to the Local Intranet zone explicitly. The first step is to remove that by going to Control Panel, Add/Remove Programs, Windows Components. Make sure you do this BEFORE installing Terminal Services.

In case you still see this message, launch Internet Explorer on the Terminal Server and go to Tools - Internet Options - Security - Local Intranet zone. Add the UNC name of the server where the application/shortcuts are located. For example, \\fileserver.

You can also use a Group Policy to do that. It is located here:
User Configuration - Windows Settings - Internet explorer Maintenance - Security zones and Content ratings
"Local intranet"

For more details, check this article:
http://support.microsoft.com/?kbid=815141
815141 - Internet Explorer Enhanced Security Configuration Changes the Browsing Experience

On my terminal servers, the printer spooler service crashes often, stopping all printing activities for all my users. Why? Is there a way to fix this? 

The main reason for spooler crashes is usually related to the installation of third party printer drivers on your server. The first rule of thumb with TS is NOT to install printer drivers on the TS server.

Before proceeding you should contact the manufacturer to make sure their drivers are indeed TS compatible. Your best option is to stick with the built-in drivers available on a plain Windows 2000 or 2003 installation and if not possible to use a third party printing solution. As a workaround you can always force the TS to load certain drivers when certain printers are mapped.

For more information check this article:
http://support.microsoft.com/?kbid=239088
239088 - Windows 2000 Terminal Services Server Logs Events 1111, 1105, and 1106.

One of my Microsoft Office applications (Word, Outlook, excel, powerpoint) keeps coming up in safe mode on my Windows Terminal Server. How do I prevent this? 

Note the below solution requires editing the Registry. Please remember to MAKE A BACKUP prior to editing the Windows Registry. Don`t mess with it if you don`t know what you are doing! All disclaimers apply.

When you start Microsoft Outlook (or another Office application on Windows Terminal Services you may receive the following error message:

Outlook failed to start correctly last time. Starting Outlook in safe mode will help you correct or isolate a startup problem in order to successfully start the program. Some functionality may be disabled in this mode.

Do you want to start Outlook in safe mode?

You can click either Yes or No and Outlook opens. The next time you launch Outlook you are not given the prompt. However, at the next launch of Outlook you are given the prompt. On the following logon, you are not given the prompt. This loop of Outlook 2002/3 prompting for Safe Mode every other time you launch Outlook continues indefinitely.

CAUSE

=====

HKEY_LOCAL_MACHINE\Windows NT\Current Version\Terminal Server\Install\Software\Microsoft\Office\10.0\Outlook\Resiliency
with the key TermSrvCopyKeyOnce with a value of 0x1 exists in the Registry on the Windows 2000 Terminal Server in one of the subkeys under Resiliency.

When Outlook 2002/3 starts, the following Registry key is created:
HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Outlook\Resiliency.

NOTE: The Resiliency registry key for Outlook is new for Outlook 2002.

If no problems are encountered, the Resiliency key is deleted. If one of the many tests that Outlook makes at startup fail,
subkeys are written under the Resiliency key and the Resiliency key is not deleted. If the key remains,
the next start of Outlook 2002 gives the prompt.

If a subkey is deleted by an application from HKEY_CURRENT_USER (HKCU) --
specifically a subkey from HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Outlook\Resiliency while the server is in
Terminal Server Install mode, the data is copied to HKEY_LOCAL_MACHINE (HKLM):

HKLM\Software\Microsoft\Windows NT\Current Version\Terminal Server\Install\Software\\Microsoft\Office\10.0\Outlook\Resiliency

When the application attempts with the server in Terminal Server Application Mode to access the key again and finds it missing,
the application looks in this location (HKLM) for the key. If the Resiliency key is there and has the key TermSrvCopyKeyOnce under one of the
subkeys of the Resiliency key, the Resiliency key is written back to HKCU.

In this case, the Resiliency key was written with subkeys while in install mode. Once the terminal server goes back
to application mode every user is affected since Outlook 2002 always looks for the Resiliency key, thus causing the loop.

RESOLUTION

==========

Deleting

HKLM\Software\Microsoft\Windows NT\Current Version\Terminal Server\Install\Software\Microsoft\Office\10.0\Outlook\Resiliency

resolves the problem.

If you are running Citrix Metaframe Presentation Server, check to see if speedscreenApi.dll is listed as the faulting module.
You may run into this issue  after installing Metaframe and installing the lastest batch of Microsoft Updates for Windows 2000/3.

To fix this emove the keys for iexplore.exe and outlook.exe under

hklm\software\citrix\ctxhook\AppInit_Dlls\SpeedScreen

which should resolve the error message.
After that run the speedscreen manager to add those two applications to the list.

How can I check the mode of a server that`s running Windows Server 2003 Terminal Services or Windows 2000 Server Terminal Services? 

Terminal Services in Windows 2003 and Win2K Server has two modes: Remote Administration mode (known as Remote Desktop for Administration in Windows 2003) and Application mode (known as Terminal Server mode in Windows 2003). Although you can toggle between these modes, doing so will affect the installed applications and will probably cause currently installed programs to be reinstalled.

To determine the mode in which a server is currently running, perform these steps:

Start the Microsoft Management Console (MMC) Terminal Services Configuration snap-in (Start, Programs,  Administrative Tools, Terminal Services Configuration).
Select the Server Options branch in the snap-in`s left pane.
The configuration options are displayed in the right pane.
Write down the Licensing value (for a Windows 2003 system) or the Terminal Server Mode value
(for a Win2K Server system).
Close the snap-in.
If the Licensing or Terminal Server Mode value is Remote Desktop for Administration or Remote Administration,
you`re limited to two connections (plus a local console in Windows 2003) when you`re in Remote Administration mode.
If the Licensing or Terminal Server Mode value is Application or Terminal Server, you`re in Application mode
and in that mode can have multiple concurrent connections, depending on the number of existing licenses.

How do I use Windows Server 2003 drivers on a Windows 2000 Server? 

This solution comes compliments of Rick Mack of Volante Systems.
How to use Windows Server 2003 drivers on a Windows 2000 system. 

1. stop the spooler, eg "net stop spooler"

2. cd %systemroot%\inf

3. rename ntprint.inf to ntprint.inf.old
    and delete ntprint.pnf

4. Make a directory, (it can be anywhere) but for this exercise:
    md c:\w2k3_drv
    md c:\w2k3_drv\i386 

5. Copy driver.cab from \i386 on the Windows Server 2003 CD to
c:\w2k3_drv\i386\pdriver.cab.
    Make sure it isn`t called driver.cab otherwise it could potentially be used as a
source for other system drivers. 

6. Copy ntprint.inf from \i386 on the Windows Server 2003 CD to c:\winnt\inf 

7. edit c:\winnt\inf\ntprint.inf.
    Look for the following section:

     [SourceDisksNames.x86]
     1   = %WinNET2003%,driver.cab,,"I386"

     [SourceDisksNames.amd64]
     1   = %WinNET2003%,driver.cab,,"Amd64"

     [SourceDisksNames.ia64]
    1   = %WinNET2003%,driver.cab,,"Ia64" 

    replace these lines with (alter drive lettering to suit):

    [SourceDisksNames.x86]
    1   = c:\w2k3_drv,pdriver.cab,,"I386" 

8. restart the spooler, "net start spooler"

When you add a printer now the Server 2003 drivers will be used.

Sometimes a resource dll isn`t found and you`ll have to manually select
c:\w2k3_drv\i386\pdriver.cab.

Aside from that this will let you use all the native unidriver and postscript Windows
server 2003 drivers on Windows 2000.

[1] 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 20 21 22 23 24 25 26

Receive all the latest articles by email!

Receive Real-Time & Monthly VirtualizationAdmin.com article updates in your mailbox. Enter your email below!
Click for Real-Time sample & Monthly sample

Become a VirtualizationAdmin.com member!

Discuss all your Virtualization issues with other experts. Click here to join!

Readers' Choice

Which is your preferred Backup and Recovery solution?

Follow TechGenix on Twitter