Workaround For Installing RDS CALs On An Azure VM

This article describes a workaround for installing Remote Desktop Services (RDS) Client Access Licenses (CALs) on an Azure Virtual Machine (VM) running Windows Server 2012 R2 Essentials. This VM will be used to provide Remote Desktop Services. The environment is small enough that only a single server is needed. In addition to being a Domain Controller (DC), this server will also have the Remote Desktop (RD) Connection Broker, RD Licensing Server, RD Web Access, and RD Session Host roles installed. An RD Gateway will not be defined (in Deployment properties, under RD Gateway, the radio button “Do not use an RD Gateway server” should be selected).

Installing the pack of 25 RDS CAL “Per User” licenses (Licensing program = Retail Purchase) was easy – you just need to have the licensing keys, connect to Microsoft Licensing and register a contact by using Server Manager – Tools – Terminal Services – Remote Desktop Licensing Manager to install them. Once they are installed, you should see x CALs installed and 0 available. What you want to see of course is x CALs installed, x CALs available.

If you run Server Manager – Tools – Terminal Services – RD Licensing Diagnoser, the error message you will get is “The licensing mode for the Remote Desktop Session Host server is not configured”. This error means that it does not know that you installed those CALs.  In addition, the Remote Desktop licensing mode configured on an RD Session Host server must match the type of RDS CALs available on the licensing server, so make a note of it (Per User or Per Device).

Fixing this licensing issue using Deployment properties (the normal way)

To access Deployment properties, in Server Manager, click on Local Server – Remote Desktop Services – Overview. Under Deployment Overview in the middle pane, click Tasks, and select Edit Deployment properties. Click on RD Licensing. Now it seems simple enough to specify Per user (or Per Device), select the licensing server and click Apply.

Problem is: after doing the above multiple times,  Server Manager – Tools – Terminal Services – RD Licensing Diagnoser continues to report the same issue: “The licensing mode for the Remote Desktop Session Host server is not configured.”

Using PowerShell to set the licensing type and license server

PowerShell can also be used as described in several posts but that did not work either:

$obj = gwmi -namespace “Root/CIMV2/TerminalServices” Win32_TerminalServiceSetting


Verify the license server configuration:

$obj = gwmi -namespace “Root/CIMV2/TerminalServices” Win32_TerminalServiceSetting


The above command returns a blank value.

SOLUTION: Use GROUP POLICIES on the VM to set the licensing server and the license type.

On the VM run (as Administrator) the Local Group Policy Editor gpedit.msc

Navigate to Administrative Templates – Windows Components – Remote Desktop Services – (Ignore RD Licensing branch) -Remote Desktop Session Host – Licensing. Select “Use the specified Remote Desktop license Servers” and click on “Edit Policy Setting” to the left. Make sure the policy is enabled. Enter the name or IP address on the VM. (Note: never a bad idea to assign a static private IP to this VM when you create it). I entered the private IP address. Click Apply and OK. Verify that it is now Enabled. Repeat for “Set the Remote Desktop Licensing mode” .

Now Server Manager – Tools – Terminal Services – RD Licensing Diagnoser will report that everything is configured corrected.

Going back to Server Manager – Tools – Terminal Services – Remote Desktop Licensing Manager you should now see x CALs installed and x available.

Note that if you just installed this server, you may still be within the grace period of 120 days. So if you really want to test that your RDS CALs are being used, you will need to remove the following registry key.

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

The inability to use the normal Edit Deployment properties process may be due to the fact that the licensing server is installed on the same server as the RDS server or it may be related to Windows Server 2012 Essentials. If you run into this issue, use Group Policies.

Leave a Reply