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
Using Usrmgr.exe with Windows 2000 Terminal Services on Windows NT 4.0 Domain 

PSS ID Number: Q261099

Article Last Modified on 08-8-2001


The information in this article applies to:

  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows NT Server 4.0
  • Microsoft Windows NT Server4.0, Terminal Server Edition


Summary

This article describes how to use User Manager in Windows 2000 to gain access to additional user properties that are available for use with Terminal Services in a Windows NT 4.0-based domain.


More Information

A Windows 2000 Terminal Services-based server can be a member server of a Windows NT 4.0-based domain, but User Manager on the Windows NT 4.0-based primary domain controller (PDC) cannot display the new User Account properties in Windows 2000. Windows 2000 contains dynamic-link libraries (DLLs) that make these properties available. The new properties are the TSConfig button, the Terminal Services profile path, and the Terminal Services Directory folder. If these properties are configured, they are applied when users log on to Terminal Services. If you used Windows NT 4.0, Terminal Server Edition, to install the PDC, these user account properties are available by using User Manager for Domains on the PDC. Otherwise, you must use the User Manager tool (Usrmgr.exe) that is included with Windows 2000 Server.

To run User Manager on a Windows 2000-based member server to view or modify properties for domain user accounts:

  1. Log on to the Windows 2000 Terminal Services-based server as a user with administrative privileges in the domain.
  2. Click Start, click Run, type usrmgr.exe, and then click OK.
  3. If you receive the following error message, click Yes, click the target Windows NT 4.0-based domain, and then click OK:

    User Manager for Domains cannot be used to manage a Windows 2000 or higher domain, Do you want to select another Domain to administer?
    NOTE: This error message occurs if User Manager is pointing at a Windows 2000-based domain on the same network as the Windows NT 4.0-based domain.
  4. When User Manager displays the user accounts for the target domain, double-click the user account that you want to administer.
  5. Click Profiles to gain access to the Terminal Server Profile Path and Terminal Server Home Directory properties.
HOW TO: Use the Terminal Services Client Registry Editor tool TSREG to Modify Client Registry Settings in Windows 2000 Terminal Services 

PSS ID Number: Q321706

Article Last Modified on 08-6-2002


The information in this article applies to:

  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Professional

IMPORTANT: This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:
Q256986 Description of the Microsoft Windows Registry

IN THIS TASK


Summary

WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

This step-by-step article describes how to use the Terminal Services Client Registry Editor tool (Tsreg.exe) to modify Terminal Services client registry settings in Microsoft Windows 2000 Terminal Services.

Tsreg.exe is available in the Microsoft Windows 2000 Server Resource Kit. You can use this graphical user interface-based tool to modify registry settings that relate to Terminal Services client options such as bitmap and glyph caching.

back to the top

How to Use Tsreg.exe

To start Terminal Services Client Registry Editor:
  1. Install the Windows Terminal Services client if it is not already installed on the computer.

    NOTE: To use Tsreg.exe, the Terminal Services client must be installed on the computer.
  2. Use the appropriate method:

    • If the Windows 2000 Server Resource Kit is not installed on the computer:

      1. Insert the Windows 2000 Server Resource Kit CD-ROM into the CD-ROM or DVD-ROM drive.

      2. Locate the drive letter:\Netmgmt.cab file, where drive is the CD-ROM or DVD-ROM drive that contains the Windows 2000 Server Resource Kit CD-ROM, and then locate the following two files:

        Tsreg.exe
        Tsreg.hlp
      3. Copy the Tsreg.exe and Tsreg.hlp files to a folder on the hard disk.

      4. Double-click Tsreg.exe.

    • If the Windows 2000 Server Resource Kit is installed on the computer:

      1. Click Start, and then click Run.

      2. Type tsreg in the Open box, and then click OK.

  3. Terminal Services Client Registry Editor uses the following 4 tabs:

    Bitmap Cache
    Glyph Cache
    Miscellaneous
    Client Profiles
    Click the tab that corresponds to the type of settings that you want to configure. The settings that are contained in each tab are described in more detail in the following sections of this article.
back to the top

The Bitmap Cache Tab

Bitmap caching stores frequently-used bitmaps (for example, the bitmap that is used to display the Start button) in a file on the client computer. This improves performance by minimizing the amount of information that is transferred over the network connection.

Bitmap caching is turned on a per-session basis from the client and requires 10 megabytes (MB) of free hard-disk space on the client computer.

The client uses persistent bitmap caching to store bitmaps that are sent from the server on persistent media such as a hard disk. Upon connection, the client informs the server of the bitmaps it has so that the server does not have to resend them.

The bitmap cache values that you configure on the Bitmap Cache tab are set in the following registry key:
HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client
To modify bitmap cache settings, run Tsreg.exe, click the Bitmap Cache tab, and then configure the settings.

back to the top

The Glyph Cache Tab

A glyph is made up of a character (such as a letter or number) and the font information that is required to calculate how the character is displayed. The glyph cache is stored on the client computer and contains outline, vector, or raster font information that is used to display characters on the client.

The first time that a glyph is requested, its appearance is calculated, and then stored in the glyph cache. The next time that the glyph is needed, it is transferred from the cache to the screen or page buffer.

The Glyph cache values that you configure on the Glyph Cache tab are set in the following registry key:
HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client
To modify glyph cache settings, run Tsreg.exe, click the Glyph Cache tab, and then configure the settings.

back to the top

The Miscellaneous Tab

Use the Miscellaneous tab to turn on or turn off the use of a shadow bitmap or dedicated terminal, configure the order draw threshold, and set the foreground lock timeout value.

The values that you configure on the Miscellaneous tab are set in the following registry keys:
HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client

-and-
HKEY_CURRENT_USER\Control Panel\Desktop
To modify these settings, run Tsreg.exe, click the Miscellaneous tab, and then configure the settings.

back to the top

The Client Profiles Tab

You can save the settings that you configure on the Bitmap Cache, Glyph Cache, and Miscellaneous tabs in a custom profile. Profiles are useful when the client uses different combinations of configuration settings. Use the Client Profiles tab to save, load, or delete custom profiles.

Profiles are saved to the following registry key:
HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client
To save, load or delete a client profile, run Tsreg.exe, click the Client Profiles tab, and then make the changes that you want to use.

back to the top

References

For more information about Tsreg.exe, see "Tools Help" in the Windows 2000 Server Resource Kit. Click Start, point to Programs, point to Windows 2000 Resource Kit, and then click Tools Help.

For additional information about Tsreg.exe and other Terminal Services resource kit tools, click the article number below to view the article in the Microsoft Knowledge Base:

Q240444 Useful Terminal Services Resource Kit Utilities
For more information about the Windows 2000 Server Resource Kit, visit the following Microsoft Web site:
http://www.microsoft.com/windows2000/techinfo/reskit/default.asp#section1
For more information about Windows 2000 Terminal Services, see the Terminal Services Online Documentation at the following Microsoft Web site:
http://www.microsoft.com/windows2000/en/server/help/default.asp?url=/windows2000/en/server/help/sag_termsrv_topnode.htm
back to the top
HOW TO: Use the RESET SESSION Command to Reset a Session in Windows 2000 Terminal Services 

PSS ID Number: Q320192

Article Last Modified on 08-6-2002


The information in this article applies to:

  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Professional

IN THIS TASK


Summary

This step-by-step article describes how to use the reset session command to reset a client session in Windows 2000 Terminal Services.

You can use either Terminal Services Manager or the reset session command to reset a Terminal Services session. If you reset a user`s session, all of the programs that are currently running are closed and the session is immediately deleted from the server that is running Terminal Services. You may want to reset a session in situations in which the session is not functioning correctly or if the session has stopped responding.

back to the top

Overview of the RESET SESSION Command

The reset session command uses the following syntax:
reset session session_name [ /server: server_name] /v
reset session session_ID [ /server: server_name] /v
The following list describes the parameters that you can use with the reset session command:
  • session_name: Use this parameter to specify the name of the session that you want to reset. To determine the name of the session that you want to reset, use the query session command.

  • session_ID: Use this parameter to specify the identification number (ID) of the session that you want to reset. To determine the ID of a session that you want to reset, use the query session command.

  • /server server_name: Use this parameter to specify a Terminal server that contains the session that you want to reset. Use this parameter only if you use reset session from a remote server. If you omit this parameter, the current Terminal server is specified.

  • /v: Use this parameter to display information about the actions that are performed if you run the reset session command.

NOTE: You can reset your own sessions; however, if you want to reset another user`s session, you must have Full Control access permission.

back to the top

How to Use the RESET SESSION Command to Reset a Session

The following example describes how to use the reset session command to reset a session on the current Terminal server:
  1. Click Start, and then click Run.
  2. Type cmd in the Open box, and then click OK.
  3. Type query session at the command prompt, and then press ENTER to determine the name or the ID of the session that you want to reset.

    You receive a list that describes the sessions on the current Terminal server. The list may look similar to the following list:

    SESSIONNAME    USERNAME       ID STATE  TYPE   DEVICE
    >console        administrator   0 active wdcon
     rdp-tcp#1      user1           1 active rdpwd
     rdp-tcp                    65536 listen rdpwd
                                    2 idle
                                    3 idle 
  4. To reset the session of user1 by using the session name, type the following line at the command prompt, and then press ENTER:

    reset session rdp-tcp#1
    User1 receives the following message:
    The Terminal server has ended the connection.
  5. To reset the session of user1 by using the session ID, type the following line at the command prompt, and then press ENTER:

    reset session 1
    User1 receives the following message:
    The Terminal server has ended the connection.
back to the top

References

For more information about the reset session command and the query session command, visit the following Microsoft Web site:

http://www.microsoft.com/windows2000/en/server/help/ts_cmd_n_001.htm
For more information about Windows 2000 Terminal Services, see the Terminal Services Online Documentation at the following Microsoft Web site:
http://www.microsoft.com/windows2000/en/server/help/default.asp?url=/windows2000/en/server/help/sag_termsrv_topnode.htm
back to the top
HOW TO: Connect a Handheld PC to a Terminal Services Server 

PSS ID Number: Q312102

Article Last Modified on 02-15-2002


The information in this article applies to:


Summary

This article describes how to connect your Handheld PC Professional device to a Terminal Services server.

You can use your Handheld PC Professional device to connect to a Microsoft Windows NT 4.0-based or Microsoft Windows 2000-based server that is running Terminal Services. After you connect to a Terminal Services server, you can use the programs and network resources that are available on the Terminal Services server.

back to the top

How to Install Mobile Terminal Server

Microsoft Windows 2000 Server includes a tool that is named Mobile Terminal Server. This tool is a Microsoft Windows CE-based terminal client that can connect a Handheld PC Professional device to a Terminal Services server over an existing connection on the handheld device. The Mobile Terminal Server tool is located on the Windows 2000 Server CD-ROM, and is also available from the following Microsoft Web site:
http://www.microsoft.com/windowsce/enterprise/resources/mts.asp
Connect the handheld device to your desktop PC, and the run the Setup program to install the terminal client on your device.

back to the top

How to Create a Terminal Server Connection

After you install the terminal client, you must create a connection. To create a Terminal Services server connection:
  1. On the Handheld PC Professional device, tap Start, tap Programs, and then tap Terminal Server Client. This starts the Client Connection Wizard.
  2. Type a description for the connection and the name or IP address of the Terminal Services server to which you want to connect.
  3. If you are connecting to the Terminal Services server by using a dial-up connection, tap Low speed connection.
  4. Tap Next.
  5. Tap Log on automatically, and then type the user name, password, and domain with which to log on to the Terminal Services server. Or, do not tap Log on automatically if you want to type your authentication information each time you start the connection.
  6. Tap Next.
  7. Tap Display desktop if you want the Terminal Server client to display the full desktop from the Terminal Services server. Or, tap Launch application if you want a specific program on the Terminal Services server to be started instead of displaying a desktop.
  8. Tap Finish. The Client Connection Wizard finishes and an icon for the new connection is added to the desktop. Double-tap this icon to start the connection and connect to the Terminal Services server.
What are the issues of running Windows 2000 Terminal Services in an Active Directory Domain? 

PSS ID Number: Q250776

Article Last Modified on 07-10-2002


The information in this article applies to:

  • Microsoft Windows 2000 Datacenter Server
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Server


Summary

Windows 2000 Terminal Services provides increased functionality for Windows 2000 domain environments, and affects all aspects of the domain environment. This article describes the affected areas, and provides links to Microsoft Knowledge Base articles that contain specific troubleshooting steps for those areas.


More Information

You can install Terminal Services for Windows 2000 during Windows 2000 Setup, or at any time thereafter. Windows 2000 server administrators can enable or disable Terminal Services by using the Add/Remove Programs tool in Control Panel. For additional information about how to install Terminal Services, click the article number below to view the article in the Microsoft Knowledge Base:

Q222992 Windows 2000 Terminal Services Toggle Functionality

Installing Terminal Services on a Domain Controller

When you enable Log on Locally on a domain controller that is running Terminal Services, this feature is also enabled at the console of all domain controllers for this domain, and can be accessed by all Terminal Services clients. Log on Locally is described later in this article in the User Rights section.

Installing Terminal Services on a Member Server

Windows 2000 Terminal Services is designed to run a variety of Microsoft BackOffice programs. The following modes are available in Terminal Services:

Application Server Mode

  • Users are able to connect to the Terminal Server, and functionality is similar to Windows NT 4.0 Terminal Server.

  • Requires Terminal Server Client Access Licenses (CALs).

  • Citrix MetaFrame can be installed for user connections by Independent Computing Architecture (ICA) clients.

Remote Administration Mode

This mode permits administrators to remotely administer a Terminal Server through a session.
  • Two concurrent connections are available for server administration, and Terminal Services clients are unable to run programs.

  • Citrix MetaFrame is not feature complete.

For additional information about Terminal Services modes, click the article number below to view the article in the Microsoft Knowledge Base:
Q243212 Determining the Mode of a Terminal Services Server
For additional information about changing Terminal Services modes, click the article number below to view the article in the Microsoft Knowledge Base:
Q238162 Change Between Remote Administration and Application Server Mode
For information about how to use Terminal Services for remote administration of the Windows 2000 Server family, view the following Microsoft Web site:
http://www.microsoft.com/windows2000/techinfo/administration/terminal/tsremote.asp
For additional information about how to add Server Operators to the list of available logons, click the article number below to view the article in the Microsoft Knowledge Base:
Q253831 Remote Administration of Terminal Services by Non-Administrators Accounts
NOTE: By default, only the administrators group has remote administration permissions. For additional information about the performance impact of remote administration, click the article number below to view the article in the Microsoft Knowledge Base:
Q243213 Impact of Running Remote Administration on a Terminal Server
For additional information about installing MetaFrame in remote administration mode, click the article number below to view the article in the Microsoft Knowledge Base:
Q238353 MetaFrame 1.8 Installs on a Remote Administration Mode Terminal
NOTE: Remote administration mode only permits two concurrent connections and does not permit a Terminal Server to go into Install mode for program installation.

Active Directory Users and Computers

Terminal Server Profile Path

Used for profiles while in Terminal Server Edition (TSE), and for non-TSE profiles.

Terminal Server Home Folder

Home folders are used to store user data in a multiple-user environment. Local profiles are created in the x:\Documents and Settings\ Username folder on the Terminal server, where Username is the user logon name.

It is not recommended for Clustered Terminal Services by Network Load Balancing or with Citrix MetaFrame add-on, which is described later in this article. This can also fill up the small system partition and not utilize the large data partitions.

Roaming Profiles

Terminal Server Profile Path is used for roaming profiles only while in TSE, and also works for clustered Terminal Server. You can select a server to house roaming profiles that can be accessed by any Terminal Server.

User Profile Path and Terminal Server Profile Path

User Profile Path

  • Available for both Terminal Server and Windows NT Server.

  • Available for Windows 2000 Professional desktops that have the same desktop settings whether they are using a Terminal Services session or a Windows 2000 Server and domain logon.

Terminal Server Profile Path

  • The roaming profile is for Terminal Services use only.

  • Works for Microsoft Windows 95 and Microsoft Windows 98 clients, or other desktops that need a roaming profile that stores their virtual Windows 2000 Professional user settings.

For additional information about roaming profiles, click the article number below to view the article in the Microsoft Knowledge Base:
Q243535 Terminal Services Client Roaming Profile Is Overwritten

Home Folders

Home folders store user data in a multiple-user environment.

Terminal Server Home Folder

System Policies: Local TSE and Domain Policies
  • Local policies are applied when you work on that Terminal Server only.

  • Domain policies are applied whenever the user logs on, and they are stored in the SYSVOL share on the Windows 2000 domain controllers.

Terminal Server Connection Configuration

This is the system-wide user interface settings for RDP-TCP and ICA-TCP Security tab has Permissions, and it can override Connection Permissions settings in User Manager for Domains. This is often overlooked due to the standard Windows NT Server troubleshooting on User Manager for Domains.

User Rights

"Access this Computer from Network" is needed to access the Server outside of Terminal Server sessions for file and print sharing.
For additional information about the Log on Locally feature, click the article number below to view the article in the Microsoft Knowledge Base:
Q247989 Terminal Server Clients Cannot Log on to Domain Controller
Q234237 Assign Log On locally Rights to Windows 2000 Domain Controller

Terminal Server Licensing

License Manager tracks domain licenses and other Windows 2000 servers.

Terminal Server Licensing Service

If this is not completed, you may have profile issues. If no licenses are available, the user is able to log into the domain but does not load TSE local profiles.

For information about Microsoft Windows 2000 Terminal Services Licensing, view the following Microsoft Web sites:
http://www.microsoft.com/windows2000/techinfo/howitworks/terminal/tslicensing.asp
http://www.microsoft.com/windows2000/server/howtobuy/pricing/terminal.asp
http://www.microsoft.com/windows2000/server/howtobuy/pricing/terminal.asp
For additional information about activating a license server, click the article number below to view the article in the Microsoft Knowledge Base:
Q237811 Activating a Terminal Services License Server Over the Internet
Q237801 Windows 2000 Terminal Services Requires Licensing Service

For additional information about locating an activated license server, click the article number below to view the article in the Microsoft Knowledge Base:
Q239107 Establishing Preferred Terminal Services License Server
Q232520 Description of Terminal Services License Server Discovery

For additional information about license management for Terminal Services, click the article number below to view the article in the Microsoft Knowledge Base:
Q244749 Licenses Required When Using Terminal Services Client Software
Q248430 How to Transfer TS CAL from One Computer to Another
For additional information about upgrading from Windows 2000 Terminal Services Beta, click the article number below to view the article in the Microsoft Knowledge Base:
Q248409 Terminal Services Clients Cannot Connect After Upgrade
Q248650 Windows 2000 Evaluation Version and Terminal Services Licensing

Terminal Services Licensing Tool

  • An existing Windows 2000 license is used for client desktops that are running Windows 2000.

  • Temporary licenses for Windows 2000 Terminal Services Client Access License is used for clients that do not have a license, and grants them 90 days access while licenses are being purchased for non-Windows 2000-based desktop clients.

  • Temporary licenses for Windows 2000 license is used for clients that do not have a license, and grants them 90 days access while licenses are being purchased for Windows 2000-based client computers.

  • Windows 2000 Terminal Services Client Access License is used for non-Windows 2000-based desktop clients.

Citrix MetaFrame Add-on Product

Citrix MetaFrame version 1.8 for Windows 2000 Server is the next generation from MetaFrame version 1.8 thin-client solutions for Windows NT 4.0 Server, Terminal Server Edition.
  • Server Clustering for Load Balancing of the Terminal Servers.

  • Installs over Terminal Server.

  • Citrix Licensing Services can be used as well as Terminal Server License Manager.

  • Published programs for users to find and then start.

For more information about Citrix MetaFrame, view the following Citrix Web site:
http://www.citrix.com/products/metaframe.asp

Terminal Services Client Options

Remote Desktop Protocol (RDP) is the Microsoft client program that permits connections to Terminal Services with or without Citrix MetaFrame.

Supported Clients

Windows 2000 Server, Windows 2000 Professional, Microsoft Windows NT 4.0 Workstation, Microsoft Windows 95, Microsoft Windows 98, Microsoft Windows 3.x, HP/C clients for Windows CE, and Windows Based Terminals (WBT) with Remote Desktop Protocol (RDP) embedded.

Add-ons:
  • Remote control of a session.

  • Remote printer attachment.

  • Client clipboard redirector.

Independent Computing Architecture (ICA)

Citrixs client program for Terminal Server with Citrix MetaFrame

Clients: Microsoft Windows RDP clients, Macintosh, Unix, Novell, OS/2, Linux, Microsoft Windows CE, Windows Based Terminals (WBT) with ICA embedded.

Add-ons:
  • Support for several client platforms.

  • Shadowing.

  • Remote printer attachment.

  • Sound through the channel.

  • Remote HDD attachment.

Terminal Services Tools

Included with Windows 2000 Server

For additional information about these tools, click the article number below to view the article in the Microsoft Knowledge Base:
Q240444 Useful Terminal Services Resource Kit Utilities
Q243202 Windows 2000 Terminal Services Session Management Tools

Benefits of Using Terminal Services

  • You can use older hardware to run 32-bit programs.

  • Efficient management on the server.

  • Roaming profiles are easily managed.

  • Efficient license management.

  • Ease of remote administration.

For additional information about Terminal Services, view the following Microsoft Web sites:
http://www.microsoft.com/windows2000/technologies/terminal/default.asp
http://www.microsoft.com/windows2000/techinfo/howitworks/terminal/tssol.asp
For information about program optimization, view the following Microsoft Web site:
http://www.microsoft.com/windows2000/techinfo/planning/terminal/tsappdev.asp
For additional information about issues in a domain environment, click the article number below to view the article in the Microsoft Knowledge Base:
Q245607 Terminal Server Edition Issues in a Domain Environment
Microsoft provides third-party contact information to help you find technical support. This contact information may change without notice. Microsoft does not guarantee the accuracy of this third-party contact information.
HOW TO: Display a List of Terminal Servers on the Network by Using the QUERY TERMSERVER Command in Windows 2000 

PSS ID Number: Q321700

Article Last Modified on 08-6-2002


The information in this article applies to:
  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Professional

IN THIS TASK


Summary

This article describes how to use the query termserver command in Windows 2000 Terminal Services to display a list of servers that are running Terminal Services on the network.

You can use the query termserver command to search the network for all of the attached Terminal servers and to return a list of the server names. If you use the /address parameter with this command, you can search for the network addresses and the node addresses of the servers.

back to the top

Overview of the QUERY TERMSERVER Command

The query termserver command uses the following syntax:
query termserver [ server_name][ /domain: domain] [ /address] [ /continue]
You can use the following parameters with the query termserver command:
  • server_name: Use this parameter to specify the name of the Terminal server.

  • /domain: domain: Use this parameter to specify the domain that you want to query for Terminal servers. If you omit this parameter, the current domain is specified.

  • /address: Use this parameter to include the network address and the node address of each Terminal server in the command output.

  • /continue: Use this parameter to prevent the pause and the "Press any key when ready" message from appearing after each output.

back to the top

Examples

The following examples describe how to use query termserver to display a list of Terminal servers on the network:
  • To display a list of all Terminal servers in the current domain, type the following line at the command prompt, and then press ENTER:

    query termserver
    A list of all Terminal servers in the current domain appears in the Cmd window. If the list of servers extends beyond the window, press any key to view the list of servers that does not fit in the window.

  • To display the network and node address of a Terminal server named Server8 in the current domain, type the following line at the command prompt, and then press ENTER:

    query termserver server8 /address
  • To display a list of all Terminal servers in the Corp domain without a pause, type the following line at the command prompt, and then press ENTER:

    query termserver /domain:corp /continue
    A list of all Terminal servers in the Corp domain appears in the Cmd window.

  • To display the network and node address of a Terminal server named Server5 in the Corp domain, type the following line at the command prompt, and then press ENTER:

    query termserver server5 /domain:corp /address
back to the top

References

For more information about the query termserver command, visit the following Microsoft Web site:

http://www.microsoft.com/windows2000/en/server/help/ts_cmd_n_001.htm
For more information about Windows 2000 Terminal Services, see the Terminal Services Online Documentation at the following Microsoft Web site:
http://www.microsoft.com/windows2000/en/server/help/default.asp?url=/windows2000/en/server/help/sag_termsrv_topnode.htm
back to the top
HOW TO: Use the TSSHUTDN Command to Shut Down a Terminal Server in Windows 2000 Terminal Services 

PSS ID Number: Q320188

Article Last Modified on 08-6-2002


The information in this article applies to:

  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Professional

IN THIS TASK


Summary

This step-by-step article describes how to use the tsshutdn command to shut down a computer that is running Windows 2000 Terminal Services.

Use the tsshutdn command to shut down and restart a Terminal server. If you do so, users are notified that their sessions will end and the server is shut down in a controlled manner. Microsoft recommends that you use the tsshutdn command instead of the Shut Down option on the Start menu to shut down a Terminal server. If you use the Shut Down option on the Start menu, users are not notified before their sessions are ended, and they may experience data loss on the client computer.

NOTE: You must be the administrator or a member of the Administrators group to use tsshutdn.

back to the top

Overview of the TSSHUTDN Command

The tsshutdn command uses the following syntax:
tsshutdn wait_time [ /server: server_name] /reboot /powerdown /delay: log_off_delay /v
You can use the following parameters with the tsshutdn command:
  • wait_time: Use this parameter to specify the time period to wait (after users are notified) after which users are logged off from their sessions. The default setting is 60 seconds.

  • /server: server_name: Use this parameter to specify the Terminal server that you want to shut down. If you omit this parameter, the current Terminal server is shut down.

  • /reboot: Use this parameter to shut down and restart the Terminal server after client sessions are ended.

  • /powerdown: Use this parameter to turn off the Terminal server (if the computer supports Advanced Power Management).

  • /delay: log_off_delay: Use this parameter to specify the time period to wait (after users are logged off from their sessions) after which all processes end and the Terminal server shuts down. The default setting is 30 seconds.

  • /v: Use this parameter to display information about the actions that are performed if you run this command.

back to the top

Examples

The following examples describe how to use tsshutdn to shut down a Terminal server:
  • To end all client sessions 60 seconds after notification, and then shut down the current terminal server 30 seconds after all of the users are logged off, type the following command at the command prompt, and then press ENTER:

    tsshutdn /v
    Users receive the following message:
    System is shutting down in 60 seconds.
  • To end all client sessions 5 minutes after notification, and then shut down and restart the Terminal server 1 minute after all of the users are logged off, type the following command at the command prompt, and then press ENTER:

    tsshutdn 300 /reboot /delay:60 /v
    Users receive the following message:
    System is shutting down in 300 seconds.
  • To end all client sessions 2 minutes after notification, and then shut down and restart a Terminal server named "Server8" 20 seconds after all of the users are logged off, type the following command at the command prompt, and then press ENTER:

    tsshutdn 120 /server:server8 /delay:20 /v
    Users receive the following message:
    System is shutting down in 120 seconds.
back to the top

References

For more information about the tsshutdn command, visit the following Microsoft Web site:

http://www.microsoft.com/windows2000/en/server/help/ts_cmd_n_001.htm
For more information about Windows 2000 Terminal Services, see the Terminal Services Online Documentation at the following Microsoft Web site:
http://www.microsoft.com/windows2000/en/server/help/default.asp?url=/windows2000/en/server/help/sag_termsrv_topnode.htm
back to the top
How do I assign a home directory to Windows 2000 Users? 

PSS ID Number: Q320043

Article Last Modified on 04-9-2002


The information in this article applies to:

  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Professional

IN THIS TASK


Summary

This step-by-step article describes how to assign a home directory to a user by using the Active Directory Users and Computers MMC, the Computer Management MMC, a logon script, or the command line.

Home directories and My Documents make it easier for an administrator to back up user files and manage user accounts by collecting many or all of a user`s files in one location. If you assign a home directory to a user, you can store user`s data in a central location on a server, and make backup and recovery of data easier and more reliable.

If no home directory is assigned, the computer assigns the default local home directory to the user account (\Users\Default on the user`s local drive where Windows 2000 is installed as an upgrade, or the root directory where Windows 2000 is installed as the initial version). The home directory can use the same location as the My Documents folder.

When you are using Windows 2000 Terminal Services, the user profile is the default home directory.

back to the top

Assign a Home Directory to a Domain User

NOTE: To specify a network path for the home directory, you must first create the network share and set permissions that allow the user access. You can do this with Shared Folders in Computer Management on the server computer.

To assign a home directory to a domain user:
  1. Click Start, point to Programs, point to Administrative Tools, and then click Active Directory Users and Computers.
  2. In the Details pane, right-click the applicable user account, and then click Properties.
  3. In the Properties dialog box, click the Profile tab.
  4. Under Home folder, type the directory information.
back to the top

Assign a Home Directory to a Local User

To assign a home directory to a domain user:
  1. Click Start, point to Settings, and then click Control Panel. Double-click Administrative Tools, and then double-click Computer Management.
  2. In the console tree, click Users in Local Users and Groups.
  3. Click the user account that you want to work with.
  4. Click Action, and then click Properties.
  5. Click the Profile tab, click Connect, and then specify a drive letter.
  6. In the To box, type a path.

    • You can use a network path, such as:

      \\server\users\tester
    • Or a local path, such as:

      c:\users\tester
    • You can substitute %username% for the last subdirectory in the path, such as:

      \\server\users\%username%
NOTE: If no home directory is assigned, the computer assigns the default local home directory to the user account. This is \USERS\DEFAULT on the user`s local drive where Windows 2000 is installed as an upgrade, or the root folder where Windows 2000 is installed as the initial version.

back to the top

Specify a Home Directory For a Terminal Server

In Windows 2000, you can specify a home directory for a terminal server. Each user on a terminal server should have a unique home directory. This ensures that program information is stored separately for each user in the multi-user environment.

NOTE: If you specify only the home directory for Windows 2000, that home directory is used for both Windows 2000 and Terminal Services.

To specify a home directory for a Terminal server:
  1. Complete one of the following procedures:

    • For a domain user account:

      1. Start Active Directory Users and Computers. To do so, click Start, point to Programs, point to Administrative Tools, and then click Active Directory Users and Computers.

      2. In the console tree, expand the domain node, and then click the folder in which users are located.

      3. Double-click the user whose home directory you want to change.

    • For a local user account:

      1. Open Computer Management (Local). To do so, click Start, point to Settings, and then click Control Panel. Double-click Administrative Tools, and then double-click Computer Management.)

      2. In the console tree, click Users.

      3. Double-click the user whose home directory you want to change.

  2. Click the Terminal Services Profile tab, and then complete either of the following procedures:

    • If the Terminal Services home directory is on the local server, click Local path, and then type the path to the profile. For example, c:\users\tester$.

    • If the Terminal Services home directory is on a network share, click Connect, select a drive to connect, and then type the network path. For example, \\server\tester$.

  3. Click Apply.

For additional informationabout user profile and home directory behavior with Terminal Services, click the article number below to view the article in the Microsoft Knowledge Base:
Q246132 User Profile and Home Directory Behavior with Terminal Services
back to the top

Assign a Home Directory to a User from the Command Line

You can use the net user command to assign a home directory to a user from the command line. For example, at the command line, type net user tester /homedir:\\server\tester$ , and then press ENTER to assign the tester$ hidden shared folder on the server that is named "server" to the user Tester.

back to the top

Assign a Home Directory to a User By Using a Logon Script

You can automate user account creation and home directory assignment. You can use the net user command to create local user accounts in configuration scripts.

Create a Logon Script

The following example creates a user that is named tester, with comment, password expiration, home directory, and profile path configured:
NET USER tester /add /comment:"Example Account for User"
/expires:never 
/homedir:\\zippy\%username%$ 
/profilepath:\\zippy\profile 
back to the top

Assign a Logon Script to a Profile

To assign a logon script to a profile:
  1. Click Start, point to Settings, and then click Control Panel.
  2. Double-click Administrative Tools, and then double-click Computer Management.
  3. In the console tree, in Local Users and Groups, and then click Users.
  4. Click the user account that you want to work with.
  5. Click Action, and then click Properties.
  6. Click the Profile tab, and then type the file name of the script in the Logon script box.

    NOTE: If the logon script is stored in a subdirectory of the domain controller`s logon script path (sysvol\domainname\scripts), precede the file name with that relative path, such as:

    • clerks.bat

      -or-

    • admins\admin_name.cmd

    For local accounts, the logon script path is systemroot\system32\repl\import\scripts.
For additional information, click the article number below to view the article in the Microsoft Knowledge Base:
Q271657 Scripted Home Directory Paths Require That Folders Exist
back to the top
HOWTO: Design a Service to Interact with Multiple User Sessions 

PSS ID Number: Q308403

Article Last Modified on 04-26-2002


The information in this article applies to:

  • Microsoft Win32 Application Programming Interface (API)
    • the operating system: Microsoft Windows NT 4.0
    • the operating system: Microsoft Windows 2000
    • the operating system: Microsoft Windows XP

Summary

This article explains how to design a Windows service application to interact with users through a graphical user interface (GUI) on a multiuser system. The architecture that is described in this article should be used for services that will run on Windows NT 4.0 Terminal Server Edition, Windows 2000 with Terminal Services, or Windows XP with fast user switching. This architecture will also work well for single-user systems (non-Terminal Services servers).


More Information

The general architecture for an interactive service on a multiuser system is described in the following section. However, it may be helpful for you to first read the section later in this article titled "Understanding Services and Terminal Server," which provides terms and architectural information that pertain to this design.

Designing an Interactive Service for Terminal Server

If a service that is running on a multiuser system must interact with the logged-on user, the service should do so through a separate GUI application that runs within the user`s session. This GUI application should be designed to communicate with the service through some method of interprocess communication, such as through a named pipe. Note that this is a client/server architecture. The client process (the GUI application) can be configured to run within each user session as a hidden process. The easiest way to cause the client to run in each session is to add the client process to the Run key in the HKEY_LOCAL_MACHINE hive of the registry, as described in the following Microsoft Knowledge Base article:
Q137367 Definition of the RunOnce Keys in the Registry
The server process (your service) then communicates with the appropriate client through some means of interprocess communication to tell the client when to display the GUI. The client, in turn, communicates the results of the user`s interaction back to the service so that the service can take the appropriate actions.

Because there will be multiple clients running on the system (a separate client will be running in each user session), the service must have a well-defined method to distinguish among the clients. The most common method to distinguish clients is to name the channel of communication by using the client`s session ID. For example, if the client is running in session 4, the client may create a pipe whose name is a concatenation of an unpublished GUID followed by "Channel_4". The client will then pass its session ID to the service (perhaps by connecting to another pipe that is created by the service) so that the service knows to connect to the "Channel_4" pipe. The client can obtain its session ID by calling WTSQuerySessionInformation() with WTSSessionId as the desired information class.

SECURITY NOTE: For maximum security, the client should specify FILE_FLAG_FIRST_PIPE_INSTANCE in the dwOpenMode parameter when calling CreateNamedPipe(). This will protect against rogue applications that might squat on the pipe name in hopes of connecting to a process running in the LocalSystem account.

When you are designing the client and service applications, a final consideration is the sharing of named kernel objects (events, mutexes, semaphores, file mapping objects, and so forth). By default, a kernel object is only accessible within the session in which the object was created. This is called the local session namespace. If the client application and the service application both need access to the same kernel object, the object must be created in the global namespace. To create an object in the global namespace, simply prefix the object name with "Global\". Global objects are accessible across Terminal Services sessions.

NOTE: The "Global\" prefix is not required on the pipe name, because pipes are global by default. To determine whether the "Global\" prefix is required for an object, refer to the Platform SDK documentation for the object.

Understanding Services and Terminal Server

A service is an application that can execute even when no user is logged on to the system. A service usually runs under a special user account called the LocalSystem account. Applications that run under the LocalSystem account have special privileges that allow them to exercise a great deal of power on the local computer. Under most circumstances, you would not want to directly expose a user to this kind of power, which could be used to bypass system security.

To further isolate a service from the interactive user, the service usually runs within a noninteractive window station. This means that even if the service does display a GUI, the interface will not be visible to the user.

Prior to the introduction of Terminal Server, if a service needed to display a GUI, the service could simply be installed as an interactive service. This allowed the service to run under the LocalSystem account on the interactive window station. On a single-user system, a GUI that is displayed by an interactive service appears on the desktop of the interactive user.

On Terminal Services-based servers, there is the concept of a user session. When multiple users log on to the Terminal Services-based server, there are multiple user sessions. Each session is identified by a unique session ID (beginning with session 0 and continuing upward), and each session receives its own interactive window station. When a user logs on to a Terminal Services-based server, the user connects to an existing session. At that point, the system creates a new session to accept the next connection. If a user logs off the Terminal Services-based computer, the user`s session is destroyed (unless it is session 0), and the session ID is available for reuse.

A user can log on to a Terminal Services server either locally or remotely. To log on locally, the user sits down at the physical Terminal Services-based server computer and logs on to the console session. To log on remotely, the user connects to the Terminal Services-based server across a network through a Terminal Services client application.

On Windows NT 4.0 and Windows 2000, the console session always has a session ID of 0, and remote sessions always have a session ID that is greater than 0. On Windows XP, however, the console session can have any session ID (including a session ID greater than 0). Likewise, remote sessions can have any session ID (including session 0).

When you are designing a service, keep in mind that all services run in session 0. Therefore, if an interactive service displays a GUI, it will only be visible to the user who is connected to session 0. A service cannot interact directly with any session other than session 0.

Because there is no way to guarantee that the interactive user is connected to session 0, a service should not be configured as an interactive service on Terminal Services-based servers.

NOTE: Windows XP introduced a feature called fast user switching (FUS), which is simply an implementation of Terminal Services that allows multiple users to share a single computer. With FUS enabled, the user does not have to log off before another user dynamically initiates a new user session (or switches to an existing user session) on the same computer. This creates the same dilemma in which there is no way to know whether the current interactive user is connected to session 0. Therefore, a service that is designed for Windows XP should not be configured as an interactive service.
How do I Change a Terminal Server`s Listening Port from 3389? 

PSS ID Number: Q187623

Article Last Modified on 08-6-2002


The information in this article applies to:

  • Microsoft Windows NT Server4.0, Terminal Server Edition
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Professional
  • Microsoft Windows 2000 Server

IMPORTANT: This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:
Q256986 Description of the Microsoft Windows Registry

Summary

By default Terminal Server and Windows 2000 Terminal Services uses TCP port 3389 for client connections. Microsoft does not recommend that this value be changed. However, if it becomes necessary to change this port, follow these instructions.


More Information

WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

To change the default port for all new connections created on the Terminal Server:

  1. Run Regedt32 and go to this key:

    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp
    NOTE: The above registry key is one path; it has been wrapped for readability.
  2. Find the "PortNumber" subkey and notice the value of 00000D3D, hex for (3389). Modify the port number in Hex and save the new value.

    To change the port for a specific connection on the Terminal Server:

    • Run Regedt32 and go to this key:
      HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\WinStations\ connection
      NOTE: The above registry key is one path; it has been wrapped for readability.

  3. Find the "PortNumber" subkey and notice the value of 00000D3D, hex for (3389). Modify the port number in Hex and save the new value.

    NOTE: Because the use of alternate ports has not been fully implemented for Terminal Server 4.0, support will be provided as "reasonable effort" only, and Microsoft may require you to set the port back to 3389, if any problems occur.

To Alter the Port on the Client Side

  1. Open Client Connection Manager.
  2. On the File menu, click New Connection, and then create the new connection. After running the wizard, you should have a new connection listed there.
  3. Making sure that the new connection is highlighted, on the File menu, click Export. Save it as name.cns.
  4. Edit the .cns file using Notepad changing "Server Port=3389" to "Server Port= xxxx" where xxxx is the new port that you specified on Terminal Server.
  5. Now import the file back into Client Connection Manager. You may be prompted to overwrite the current one, if it has the same name. Go ahead and overwrite it. You now have a client that has the correct port settings to match your change Terminal Server settings.
NOTE: The Terminal Server ActiveX client listens on TCP port 3389 and cannot be changed.

NOTE: You must restart the Terminal Server before the new listening port becomes active, or recreate the RDP listener via Terminal Services configuration.
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

Featured Links