How to configure RDS 2012 licensing in a Citrix XenDesktop 7 scenario

When using XenDesktop 7.0 with a hosted shared desktop or app publishing scenario you will have to install a vda-agent onto the Windows Server to be able to publish apps or shared desktops.

During the install there is no check for existence of a RDS licensing server. In theory you can use the 120 day evaluation period to test with. But what when you’re done testing and want to make it permanent by adding RDS licensing?

Using Windows Server 2008 R2 or earlier is pretty straightforward. Because the Windows Server 2008 R2 RDS licensing  in my case already existed, even with older Windows Terminal services licensing, there was no need for a evaluation period.

Windows Server 2012 RDS is another story, this gives some extra headaches. Because we’re using Citrix as a connection broker we don’t have a complete Microsoft Remote Desktop Services Deployment in place.

First we need to add a RD licensing server role because this is the first Windows Server 2012 RDSH in the environment. So far so good.

Second we need to activate the license server, this succeeded too.

Next we need to assign the license server to the RDSH server and make sure the right licensing mode is used (we use PerUser licensing).

This is where the problems arise. Microsoft assumes you use a complete Remote Desktop Services deployment including a RD broker. Therefor you cannot set the properties of a RDSH via the GUI (with Server Manager) or through command line (with PowerShell) as shown in the screenshots below.



How to solve it?

To set the correct license server and the mode it is operating in, we need to use a (local) group policy or change it directly in the registry.

The group policy setting the Remote Desktop licensing mode is located in:

Computer Configuration\Policies\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Licensing

This can be configured by using either the Local Group Policy editor or the Group Policy Management console.


The other way is to manually change it on the RDSH using the following registry keys:

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services

LicenseServers <license server>
LicensingMode 2 for PerDevice; 4 for PerUser



After changing these settings, reboot your RD Session Host and you will see RD licensing is now in place and working!


  1. Heinrich Fourie

    Thanks for this, spent hours looking on the server, thought I was going crazy. Typical M$.

  2. Pingback: How to configure RDS 2012 licensing in a Citrix XenDesktop 7 scenario | itgurun

  3. topokin

    I do not know what I could be doing wrong, but this procedure seems not to be working in my case.

    I actually use the Local Group Policy Editor and I can see the result of my configuration in the Registry, but yet my RDP-Servers are not getting license.

    Anywhere else to look?

  4. You’ve probably done it, but one thing to check is your license server: is it 2012 also?. Are you using user based or device based licenses? Check the spelling on the hostname(especially zeros letter “o” and number 1 and letter “l”), can you resolve it using DNS?

  5. arun kumar

    is this process applicable for window 2008r2 and xendesktop

  6. Gerben

    not really, because xendesktop 5.6 is not to be used with RDS2008R2, you can however use policies to manage licensing with 2008R2

  7. Arian van der Pijl

    Microsoft has a KB Article specially for this;
    Guidelines for installing the Remote Desktop Session Host role service on a computer running Windows Server 2012 without the Remote Desktop Connection Broker role service.

    Interestingly enough, Microsoft does not use GPO’s but directly advices to edit the RDS host itself.
    It might because RDS Server GPO’s do interfere with the normal way of administering a RDS collection?

  8. Martin

    first, great job, this guide is realy helpfull!
    my setup is a bit different, I will use one w2k12 server with citrix studio and delivery controller installed and also my terminalserver license manager is installed (hostname w2k12-ctx), and two w2k12 servers which will be used as terminal-servers with citrix vda installed (hostname w2k12-tse01, w2k12-tse02).. the two terminal servers are configured to use the w2k12-ctx as the license server as described in your guide.. checked the registry entry on all three w2k12 servers and the servername is resolvable, but I’m not getting them use the licenses of the w2k12-ctx.. I turned off the windows firewall for testing, but no changes.. any further ideas what am I doing wrong?

  9. Gerben

    Hi Martin, First of all thank you for commenting on my post. As reply on your question about the licensing part not working and some further hints: What I have seen a couple of times before is RDS hosts that previously where in a graceperiod-sort of state, still are confused somehow. There is an option to reset this by deleting an entry in the registry. I’ve seen this being helpful a couple of times, so you might give this a try.
    The solution was to delete the REG_BINARY in

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\GracePeriod

    Only leaving the default.

    BR, Gerben

  10. Martin

    thank you for your fast response, but I’m not able to delete this value even by right click -> delete or force delete with shell (reg delete \\W2K12R1-TSE04\HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\GracePeriod /v /f)..
    shell says “wrong syntax” and right click -> delete says “not all selected values are able to be deleted”

  11. Gerben

    Thats correct, you don’t have the privilege to do so. You’ll first have to give yourself the correct permissions on that Hive in order to be albe to delete the value
    BR, Gerben

  12. Martin

    addiotionally I get the following error in my server-manager of the w2k12-ctx since yesterday. “error while data retrieval” for my two terminal-servers.

  13. Martin

    after removing and restarting my terminal-servers, the same key is restored in the registry, and they are still not using the w2k12-ctx as the license-server

  14. Pingback: XenApp 5.0 to Xenapp 7.6 Upgrade / Migration Part 3 | maaadit

Leave a comment

Your email address will not be published. Required fields are marked *