Securing RDS with certificates

In this post I’ll go through the process to implement certificates in a Microsoft RDS farm with Windows 2008 R2. It assumes that the RDS Gateway, Session Broker, Web Access and Session Host servers are installed and configured with remote apps already working.

The process describes how to generate the certificate request from a Windows 2008 R2 server, generate a Personal Information Exchange certificate so the same certificate can be used to sign RDP files on other servers that are part of the same rds farm; and configure the RDP connection and RemoteApp to use the certificate for server authentication and sign RDP files.

Note that during the process of generating the Personal Information Exchange the private key will be removed from the server where the server certificate was generated and stored with the .PFX file being password protected; this is done to protect the private key for the certificate.

Creating a Certificate Signing Request

Open Microsoft Management Console (mmc) and add the Certificates snap-in to configured for the local computer. From the Personal store under Certificates (Local Computer) Select All Tasks\Advanced Operations\ Create Custom Request …

This will bring the Certificate Enrolment window. Press Next once and it will prompt you to Select Certificate Enrolment Policy. Select Proceed without enrollement policy under Custom Request.On the Custom Request select the following options

  • Template: (No Template) Legacy key
  • Request format: PKCS #10

UPDATE: if you still have XP clients on your network then select CGN Key on the Template field, as per Rod comment below.

And press Next

For the Certificate Information press the arrow on the right hand-side of Details and then select Properties.

On the Certificate Properties window enter a Friendly name and Description.

On the Subject tab you will need to add the following properties, they are shown below with some values for example only. The Common Name is the FQDN of the RDS farm:

  • Common Name (CN) = rds.lab.local
  • Organizational Unit (OU) = IT
  • Organization (O) = The sheep network
  • Locality (L) = London
  • Country (C) = GB

You can change the values as required; make sure that the CN is equal to the name of the DNS name of the RDS farm. Note also that these are the minimum options required.

Open the Extensions tab and expand the Extended Key Usage (Application policies) and add Server Authentication and Code signing as selected options.

Select the Private Key tab and expand the Key options and select 2048 (or any other key size as you require) as the key size and tick the Make private key exportable, then press ok.

Select where to save the request and select also Base 64 as the file format

Unless the RDS farm name changes or the certificate expires the CSR is only required to be completed once. After the certificate request is signed by a Certification Authority (CA), Entrust or a private CA, the same certificate can be used on the other RDS servers; but it is required to be installed on the server were the request was made from first so it can be exported with its private key; and it is this certificate with the private key (pfx) that will be imported to the other RDS servers in the farm.

Import Certificate

Once the certificate has been generated by the CA  it will need to be imported into the server where the certificate request was generated.

Open mmc and add the Certificates snap-in to the local computer. From the Personal store under Certificates (Local Computer) select Import …

On the Certificate Import Wizard window type the location and name of the certificate or Browse to its location then press Next

Verify that the certificate store is Personal

Verify everything and press finish.

If the import was successful you will notice that on the store it will have a small key on its icon  ; if this isn’t the case then the server isn’t the server where the request was created and this certificate should be removed.

Export Personal Information Exchange (.PFX)

In order for a certificate be used for code-signing it needs to have a private key, this can be obtained from the server where the certificate was requested and imported and its identified by a small key on the certificate icon in the personal store .To start the export select the certificate then right-click select All Tasks\Export…

Note the presence of a key in the certificate icon

Press Next once and this will bring the Export Privte Key step of the wizard, and select Yes, export the private key then press Next

Select Personal Information Exchange – PKCS #12 (.PFX) as the Export File Format, tick the Include all certificate in the certification path if possible and Delete the private key if the export is successful.

Enter a strong password to protect the certificate with the private key. Remember that this certificate will be imported on the other RDS session host servers

Select or type the location to export the certificate to and save it as .pfx

Finally verify the settings, make sure the Export key is Yes and press Finish.

Keep the password and .PFX in a safe location as they are required to install the certificate on other machines.

Import Personal Information Exchange (.PFX)

To import the Personal Information Exchange certificate use the same procedure as described in Import certificate but select the .pfx file when prompted in the File to Import if using Browse change the file type to Personal Information Exchange.

You will be prompted for the certificate password. Do not check Mark this key as exportable. As this can be a security risk.

Refer to Import Certificate for further instructions.

Signing RDP files

On the RDS server open RemoteApp Manager, locate the Digital Signature Settings and press Change.

On the RemoteApp Deployment Settings window tick the Sign with a digital certificate in the Digital Signature tab, and then press Change.

A Windows Security window will pop-up with a list of valid certificates, select the certificate generated in the previously, press Ok

Back on the RemoteApp Deployment Settings window the information about the certificate being used will show under the Digital certificate details area. Press Apply and then Ok.

RemoteApp Manager main window will now display a green check and Signing as under Digital Signature Settings

RDP server authentication

This will change the certificate presented to the clients by the RDS server

On the RDS server open the Remote Desktop Session Host Configuration and select the connection to change the certificate, by default there is only one connection RDP-Tcp, and double-click on it.

On the General tab of the properties window press Select

A Windows Security window will pop-up with a list of valid certificates, select the certificate generated in the previously, press Ok

The properties window will now display the certificate being used. Press Apply and then Ok.

Growing information store on exchange


I had an Exchange 2003 running on SBS2003 and everything was working fine until the day we had to migrate into a new server. The Exchange migration was done using the Exchange migration wizard. At first everything seemed fine but a few days later the Exchange Information Store was sent offline because it had reached 16GB. The exchange database (.edb file) windows had grown from 1 wholesale nba jerseys or 2GB to 16GB in a very short amount of time for a company with 10 users.

At this stage I run a defrag on the database and gained 2MB (yes MB not Government GB as you would expect). So I decided to install Exchange SP2 to exchange remove the 16GB limit. After applying Exchange SP2 the database continued to grow at a rate of 1.5MB per minute.


Here is a list of things that I’ve done while trying to fix the problem.

Disable antivirus Used exmerge to export all mailboxes into PST files, delete then recreate the information store(exchange database) then cheap mlb jerseys import the PST using exmerge again.


After a not so extensive jogaram troubleshooting, I was able to cheap mlb jerseys find the problem; which was caused by a single outlook client. My tip was that the database wasn’t growing during lunch time, you have to trust users to close their outlook during lunch time but leave it running during the night, as at this stage I was monitoring the users connected to the exchange server, mail queues, individual mailboxes size and exchange database size. Senior With this information I went around all the workstations of users that did disconnect during lunch time and reinstalled the Outlook client. After this the exchange database stopped growing and using exmerge to export and import the mailboxes the information store was back to it 2GB wholesale nba jerseys size.

You might be thinking, that if I was monitoring the connected users, individual mailbox sizes and the exchange database how could I have missed a user filling its a mailbox and information store. The reason is quite simple: only the exchange database was growing in size, each individual user mailbox was showing a normal size.

Autologon to windows

Make wholesale mlb jerseys windows login Weather automatically after each securiry boot with a specific user account or wholesale nba jerseys with an administrator account; if the wholesale mlb jerseys account is member of the administrators cheap nba jerseys group, then you will need Sky to Citrix change Contract the AutoAdminLogin from 0 to 1

Windows  SkyMagic  Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]