Using Remote Desktop Services for Windows Server 2008 R2

Learn about the different ways Remote Desktop Services (RDS) can help you in your service offerings and get a greater understanding the RDS processing model.

Solutions provider takeaway: Solutions providers can use Remote Desktop Services (RDS) to deploy and manage customers' applications and desktops from a remote location. This chapter excerpt explains how to take full advantage of RDS and what you should know about the RDS processing model. Also find out how Remote Desktop Protocol (RDP) is crucial for viewing and uploading a session's input and output for processing.

About the book:
This chapter excerpt on Installing, Using, and Administering Remote Desktop Services (download PDF) is taken from the book Mastering Microsoft Windows Server 2008 R2. This book provides Windows Server 2008 R2 information that is relevant to solutions providers, including coverage on Active Directory, Remote Desktop Services and advice on managing user accounts. Find out all of the new Windows Server 2008 R2 technologies and learn how to use undocumented features.

Using Remote Desktop Services (RDS) -- formerly known as Terminal Services -- and an RD Session Host server makes it possible to install and manage applications, or desktops, in one location but be controlled by end users in another location.

Applications that run on the RD Session Host server are called RDS RemoteApp applications. From the end-user perspective, these applications look and feel as though they are running on their local system. The user's keystrokes and mouse movements are sent to the server. Images are sent back to the user's system. Even thin clients can easily run sophisticated applications with ease, though RDS RemoteApps are most commonly run on regular desktop systems.

The old Remote Desktop Services came in two flavors: TS for Administrators and TS in application mode. TS for Administrators is now known as Remote Desktop for Administration, and TS in application mode is known as Remote Desktop Services with an RD Session Host server. Remote Desktop for Administration was covered in Chapter 14, and this chapter covers Remote Desktop Services with an RD Session Host server. Topics include adding the RDS role, configuring an RD session host server, adding RDS RemoteApp applications, and connecting to RDS sessions.

In this chapter, you will learn to:

  • Limit the maximumnumber of connections
  • Add an application to an RD Session Host server
  • Add a RemoteApp for Web Access
  • Add a RemoteApp to the Start menu

Who Needs Remote Desktop Services?

Remote Desktop Services can be used to enable end users to run a Windows-based program on a remote server from their desktop computer. The server hosting the application is called a Remote Desktop Session Host (RD Session Host) server. It's also possible for the end users to access a full desktop session on the RD Session Host server.

As an administrator, you can do the following:

  • Deploy and manage applications on a few RDS servers instead of on hundreds or thousands of client computers.
  • Provide applications to end users whom you cannot easily support because they're in another office -- or another country.
  • Reduce the impact of client hardware failures by keeping all applications on a central server. If a client's computer dies, plug in a new one, and they're back to work.
  • Avoid misconfigured computers.
  • Get out of the hardware rat race that constantly requires more updates to support the latest and greatest software.
  • Use computers in environments that are not compatible with desktop computers.
  • Simplify help-desk and training support.

If any of these tasks are important to you, then you should seriously consider using Remote Desktop Services with a Session Host server.

Centralized Deployment of Applications

One great benefit to Remote Desktop Services is how it simplifies application deployment. Instead of deploying an application to all the clients using Group Policy or Microsoft System Center Configuration Manager (SCCM), you can install it once on the RD Session Host server.

As an example, your business may have a line-of-business application that 100 users need to access. Instead of installing the application on all 100 desktop computers, an RD Session Host server could be used. The application could be installed once on the server, and each user could then access the application remotely.

Even better, when the application needs to be upgraded or patched, you need to do it only once -- on the RDS server.

Supporting Remote Users

Remote Desktop Services can be used for remote access or branch-office access. Some applications have difficulty performing over low-speed connections or need special ports opened on the firewall. Instead of running the application over the low-speed connection, the application can be hosted on the RDS server within a well-connected network.

Clients can still connect via a VPN or low-speed dial-up connection. However, since the application is running on the RD Session Host server in a well-connected network, its performance isn't impacted by the slower connections.

More and more people are telecommuting at least a couple of days a week. Many U.S. government agencies have a legal requirement to support telecommuters, and many telecommuters often don't even have offices or desks. Rather than trying to maintain desktop computers for all the staff, many companies are giving users computers to take home and providing their applications via remote servers.

Supporting PC-Unfriendly Environments

The dream of "a PC on every desktop" will remain a dream, if for no other reason than in some environments the conditions are bad for the desktop PC or the desktop PC is bad for the conditions. In other words, it's not feasible to put a desktop PC anywhere.

Some environments are bad for PCs. PCs don't like dust, excessive heat, or vibration, and you won't like maintaining the PCs if you try to use them in an environment that has any of these characteristics. Of course, PCs can be built to work in extreme conditions such as temperatures as high as 120 degrees or even underwater. And for the companies and people who must have them in these extreme environments, engineers have engineered solutions -- but at a cost. When cost is an issue and a thin client will work, Remote Desktop Services can be a good solution.

We've also seen terminals in health club cafes and coffeehouses set up so that only the monitor is visible, thus reducing the chances of someone dropping a strawberry-banana low-fat smoothie with a shot of wheatgrass juice down the vents. For that matter, if someone does drop the smoothie down the terminal's vents, then, because the applications are installed on and running from the RDS server, replacing the device to provide an identical environment is as simple as unplugging the sticky terminal and plugging in a new one. If you drop a smoothie down a computer's vents, then restoring an identical working environment is significantly more complicated.

What about PCs being bad for the conditions? Clean rooms where chips and boards are made are good candidates for Windows terminals. You can't have dust in a clean room, and the fans in a PC kick up dust. Additionally, becoming sanitized to enter a clean room is neither simple nor inexpensive; you don't want to put devices that need care and feeding from the IT staff in there. Another factor applies to many situations, not just clean rooms: anyplace where space is at a premium is a good candidate for a Windows terminal.

Clients can be running thin clients or just about any desktop operating system including Windows, Linux, and Macintosh (though security is optimized on Windows Vista or Windows 7). This section isn't to sell you on the idea of Windows terminals but to point out that sometimes they're useful, even required -- and you can't use them without an RDS server.

Real World Scenario:

Power Struggles
Another aspect of the environment-unfriendly PC applies to the power a desktop PC uses. Several studies have been published on the cost savings of thin clients vs. desktop PCs. With the cost of power these days, the savings can be significant.

One study titled "Power to the People: Comparing Power Usage for PCs and Thin Clients in an Office Network Environment" by Stephen Greenberg, Christa Anderson, and Jennifer Mitchell-Jackson
( shows some of the possibilities. For example, a single thin client averaged about 10 watts a day while a desktop PC averaged 69 watts. This doesn't include the monitor, but both thin clients and PCs can use low-power LCD monitors instead of the power-hungry CRTs of the past.

The study estimated the cost of power at .10 per kWh and .20 per kWh, which is a good range of power costs within the United States. For 100 clients, this equated to savings of between $3,000 and $6,000 annually.

Saving on power costs isn't the only reason to use Windows terminals, but if you're tossing around the idea of replacing PCs with terminals, it's a compelling argument in favor of it.

Reducing Hardware Refreshes

Does it take a 2.5GHz Pentium with 3GB of RAM installed to check email, do accounting, and poke around on the Web a bit? Of course not, but, as of mid-2009, that's not an unusual hardware profile for a desktop computer. Not that these computers are too expensive in absolute terms; we're wryly amused that every time we buy a new computer, we pay less for a system more powerful than the last one we bought.

Still, even though they're not too expensive in absolute terms, the new computers aren't always worth it because what you're doing doesn't demand all that much from your hardware. Ironically, unless your job is something demanding such as computer-assisted design, you're often more likely to need a powerful computer at home than at work because game hardware requirements are so high. It takes more computing power to play a few swift rounds of the most recent version of WarCraft than it does to write this chapter. (Fighting orcs is hard work!)

The trouble is, sometimes you do need those more powerful computers if you're planning to keep up with existing software technology. True -- you don't need the world's fastest computer to do word processing. You may, however, need a computer faster than the one you have if you're going to keep up with the latest and greatest word processing package that everyone is using. If you want to be able to read all those charts and graphs, you can't always do it when the word processor you're using is six years old, even if it still suits your in-house needs. And you can't always run that new word processor if your computer is six years old.

However, if you're using Remote Desktop Services with an RD Session Host server, the client only displays applications running on the RDS server, rather than running them locally -- you don't have to concern yourself with whether the applications will run on the client computer, just the server. If the application will run on the RD server and the client can get to the RD server, then the application will display on the client.

Simplifying the User Interface

Another potential benefit to Remote Desktop Services is it can simplify the user interface (UI). Using a computer isn't as easy for everyone as the marketing world would have you believe. Experienced users find it easy to customize their interface, but those who are less experienced find all sorts of pitfalls when it comes to using their computers: so many options that they get confused and too many ways to break something. Colorful icons with rounded corners do not a simple UI make.

If the people you're supporting need only a single application, then you can save yourself and them a lot of grief by providing a connection that runs this application in a remote desktop and nothing else. This is particularly true with Windows-based terminals, which are little more than a monitor, a box, a keyboard, and a mouse.

Or, if the users are already running a desktop operating system, you can use RemoteApp applications. RemoteApp applications deployed via RDS are as easy to use as any other applications on the end user's computer. RemoteApp applications can be launched from the Start menu, from a desktop icon (of an .rdp file), or from a web page.

Providing Help-Desk Support

Finally, Remote Desktop Services can make application support easier, not just in terms of installing new applications and applying fixes but in helping people learn to use those applications. Remote Control lets help-desk personnel or administrators connect to another person's remote session either to watch what they're doing or to interact with the session. (This isn't the security hole it may seem -- permissions to do this can be controlled.)

When you have remote control of another user's session, you can either watch what they're doing and coach them (perhaps over the telephone) or actually interact with the session so that you can demonstrate a process. This beats standing over someone's shoulder saying, "Click the File button at the top left. No, File. The FILE button," or trying to figure out what they're doing when your only information comes from their description of the screen.

Deploying RDS RemoteApp

RemoteApp programs are applications that are running on the RD Session Host server but appear to the end user to be running on their desktop. This is often easier for an end user to conceptualize. They don't have to manage multiple desktops but instead can simply launch another application from their main desktop.

Windows Server 2008 introduced RemoteApp programs, and they've been improved in Windows Server 2008 R2. It does take a little bit of configuration to support RemoteApp programs. Once you've configured all the pieces, users can access RemoteApp applications using the following methods:

Through a web browser If RD Web Access is configured, users can access the web page and click a link to launch the application.

Using a Remote Desktop Protocol (.rdp) file Users can simply double-click a properly configured .rdp file to launch the RemoteApp application.

Through the Start menu or a program icon RemoteApp applications can be installed using traditional Windows Installer (.msi) packages (also called Microsoft Installer packages). Once installed, users can launch the applications just as any other installed application.

You'll learn how to install all the components and deploy RemoteApp applications for each of these methods in the section "Adding Remote Desktop Services" later in this chapter.

Understanding the Remote Desktop Services Processing Model

Thin-client networking or server-based computing (same thing, different emphasis) refers to any computing environment in which most application processing takes place on a server enabled for multiuser access, instead of a client. The terms refer to a network by definition, so that doesn't include stand-alone small computing devices such as personal digital assistants (PDAs) or handheld PCs, although you can add thin-client support to some of these devices.

What makes thin-client networking and computing "thin" is neither the size of the operating system nor the complexity of the apps run on the client, but how processing is distributed. In a thin-client network, most if not all processing takes place on the server. Instructions for creating video output travel from server to client, mouse clicks and keystrokes pass from the client to the server, and all video output is rendered on the client.

Son of Mainframe?

You may have heard thin-client networking described as "a return to the mainframe paradigm." (We have heard this less politely phrased as "You just reinvented the mainframe, stupid!") This comparison is partly apt and partly misleading. It's true that applications are stored and run on a central server, with only output shown at the client.

Netbooks and Thin Clients
Netbooks are exploding on the scene, and you may be wondering how they may fit in here. In case you've just gotten off a deserted island, a netbook is a small (7- to 10-inch screen) portable computer designed for communication on the Internet (hence the net in netbook). They have more resources than a thin client but significantly less than a full-blown desktop PC. Because of their size, they are highly mobile. They use less processing power, less RAM, and simpler graphics, which all contribute to using less power and to a longer battery life.

It's entirely possible to use netbooks as part of a Remote Desktop solution. The netbook could connect to the Remote Desktop server either directly over the Internet using RD Gateway or via a VPN. The applications or desktops can be executed on the Remote Desktop server so that the netbook's hardware resources aren't overly taxed.

However, the applications being run in the thin-client environment are different from those run in a mainframe environment; mainframes didn't support word processing or slide show packages, and the video demands on the graphical Windows client are necessarily greater than they were with a text-based green-screen terminal. Yet the degree of control that thin-client networking offers is mainframe-like, and we've heard one person happily describe thin-client networking and the command it gave him over his user base as "a return to the good old mainframe days."

Why the move from centralized computing to personal computers and back again? Business applications drove the development of PCs -- the new applications simply couldn't work in a mainframe environment. Not all mainframes were scrapped, by any means, but the newer application designs were too hardware-intensive to work well in a shared computing environment. But those applications came back to a centralized model when it became clear that the mainframe model had some things to offer that a PC-based LAN did not:

  • Grouping of computing resources to make sure none are wasted
  • Centralized distribution and maintenance of applications
  • Clients that don't have to be running the latest and greatest operating system with the latest and greatest hardware to support it
  • Client machines that don't require power protection because they're not running any applications locally

All in all, reinventing the mainframe has its advantages. Just as PCs didn't replace mainframes, server-based computing isn't replacing PCs. However, it's nice to have the option to use server-based computing when it makes more sense than installing applications on the desktop.

Anatomy of a Thin-Client Session

A thin-client networking session has three parts:

  • The RDS server, running a multiuser operating system
  • The display protocol, which is a data link layer protocol that creates a virtual channel between server and client through which user input and graphical output can flow
  • The client, which can be running any kind of operating system that supports the terminal client

These are explained in detail in the following sections.

The RDS Server

Remote Desktop Services is one of the optional components you can choose to install on Windows Server 2008 R2. If you've added the Remote Desktop Services role, RDS begins listening at TCP port 3389 for incoming client connection requests as soon as the server boots up and loads the core operating system.

Understanding Sessions


When a client requests a connection to the server and the server accepts the request, the client's unique view of the RDS server is called its session. In addition to the remote sessions, a special client session for the console is created.

Desktop PCs Can't Run RDS
Some have asked whether there's any way to make Windows XP, Windows Vista, or Windows 7 into a multiuser server (of sorts). Nope -- no Microsoft desktop operating system includes full-fledged Remote Desktop Services, and there is no way to add it. Windows XP, Windows Vista, and Windows 7 all include the Remote Desktop feature that allows someone to connect to the computer via the RDP display protocol. However, only one connection is supported at a time. The Remote Desktop Services feature we discuss in this chapter is solely a server-class feature.

All sessions have unique session IDs that the server uses to distinguish the processes running within different RDS sessions on the same computer. In this context, processes are roughly equivalent to executable files. When a client connects to the RDS server, a session ID is created for the session.

Figure 25.1 shows the Remote Desktop Services Manager monitoring several sessions running on an RDS server.

Figure 25.1
Remote Desktop Services Manager

Every desktop session has several base processes running within it to support the user. Additional processes in the session will depend on the applications the user is running.

Executables, Images, and Threads
In Windows operating systems, an executable file is internally known as an
image. This is because, technically speaking, an application isn't the piece getting processor cycles but instead is a collection of commands called threads that get processor time to do whatever they need to do. The threads have an environment called the process that tells them where to store and retrieve their data. The part of the process that does something is collectively called the image or executable. For the sake of consistency with the interface, we'll refer to programs running on the RDS server as processes.

The session keeps per-session processes from corrupting each other or viewing each other's data. However, although the sessions are allowed to ignore each other, they still have to coexist. All sessions use the same resources -- processor time, memory, and operating system functions -- so the operating system must divide the use of these resources among all the sessions. To do so, the RDS server identifies the processes initiated in each session not only by their process ID but by their session ID as well.

Each session has a high-priority thread reserved for keyboard and mouse input and display output, but ordinary applications run at the priority they'd have in a single-user environment. Because all session threads have the same priority, the scheduler processes user input in round-robin format, with each session's input thread having a certain amount of time to process data before control of the processor passes to another user thread. If the sessions are very active, they'll be much more competition for processor time.

The number of sessions an RDS server can support depends on how many sessions the hardware (generally memory but also processor time, network bandwidth, and disk access) can support and how many licenses are available. When a client logs out of her session, the virtual channels to that client machine close, and the resources allocated to that session are released.

The Remote Desktop Protocol

You can run all the sessions you like on the RDS server, but that won't do you any good unless you can view the session output from a remote computer and upload your input to the terminal server for processing. The mechanism that allows you to do both is the display protocol.

How RDP Works

About the authors:

Mark Minasi is a senior contributing editor for Windows IT Pro and has published 25 books, including Mastering Windows Server 2003.

Darril Gibson has earned 19 Microsoft certifications and has also written CompTIA Security+: Get Certified Get Ahead: SY0-201 Study Guide.

Aidan Finn is the systems and infrastructure manager for C Infinity and was named a Microsoft MVP on System Center Configuration Manager in 2008.

Wendy Henry has been in the IT business for 19 years and has certifications from Microsoft, Novell and Cisco. Henry is a published technical author and a contributing editor for

Byron Hynes is an enterprise technology strategist with the Microsoft Enterprise and Partner Group and has also authored Hands-On Microsoft Windows Server 2003 Active Directory (Networking).

A display protocol downloads instructions for rendering graphical images from the terminal server to the client and uploads keyboard and mouse input from the client to the server. Remote Desktop Services natively supports the Remote Desktop Protocol (RDP). RDP provides a point-to-point connection dependent on TCP/IP that displays either the desktop or a single application on the desktop of a client running RDP.

The processing demands placed on the client are reduced by a feature called client-side caching that allows the client to "remember" images that have already been downloadedduring the session. With caching, only the changed parts of the screen are downloaded to theclient during each refresh. For example, if the Microsoft Word icon has already been downloaded to the client, there's no need for it to be downloaded again as the image of the desktop is updated. The hard disk's cache stores data for a limited amount of time and then eventually discards data using the least recently used (LRU) algorithm. When the cache gets full, it discards the data that has been unused the longest in favor of new data.

Automatic Refresh Timing
The image on the screen is updated at very short intervals when the session is active. If the person logged in to the session stops sending mouse clicks and keystrokes to the server, then the RD server notes the inactivity and reduces the refresh rate until client activity picks up again. Note that in addition to each client session, there's also a session for the server's use. All locally run services and executables run within the context of this server session.

RDP Version 6.0 and Version 6.1

RDP has been around since NT 4.0 days (the first version was RDP 4.0) and has had a lot of upgrades. The current version available with Windows Server 2008 R2 is version 6.1.

Version 6.0 came out with Windows Vista. The biggest change was the ability to connect to individual applications using RemoteApp instead of launching a full desktop. It also provided support for monitor spanning or using multiple monitors in remote sessions.

Microsoft released version 6.1 in February 2008 and included it with Windows Server 2008. Mostly, this was used to provide support for advanced features to Windows XP SP3 clients. If you're running Windows XP SP3, you should check out the Knowledge Base article at http://

Installing, Using, and Administering Remote Desktop Services
  Using Remote Desktop Services for Windows Server 2008 R2
  Remote Desktop Services: Server and client requirements
  Adding Remote Desktop Services and RemoteApp programs
  Using Remote Desktop Services Manager, RDS CAL

Printed with permission from Wiley Publishing Inc. Copyright 2010. Mastering Microsoft Windows Server 2008 R2 by Mark Minasi, Darril Gibson, Aidan Finn, Wendy Henry and Byron Hynes. For more information about this title and other similar books, please visit Wiley Publishing Inc.

Dig Deeper on Operating Systems and Software Services