This post assumes that you have a basic understanding of the following:
- Windows PowerShell
- Various Remote Desktop Services role services
- Remote Desktop Licensing
- Microsoft VDI with Remote Desktop Services
What is Centralized Licensing Management?
Centralized Licensing Management is a new sub-feature that has been implemented in Windows Server 2008 R2 SP1, as a byproduct of RemoteFX work. It enables Microsoft VDI administrators to specify licensing configuration for the entire VDI deployment centrally from one place; that is, from the RD Connection Broker server.Why is centralized licensing management required?
Until Windows Server 2008 R2, in a VDI deployment the RD Virtualization Host server was not aware of licensing settings because only the RD Session Host server participated in licensing and performed license validations for the client session/connection requests. But the new licensing model for Microsoft VDI (in Windows Server 2008 R2 SP1) requires that the Remote Desktop licensing mode and the list of Remote Desktop license servers must be specified in all RD Session Host servers (configured in VM redirection mode) as well as in all the RD Virtualization Host servers (with RemoteFX enabled), because the RD Virtualization Host servers can also participate in VDI licensing. Therefore, an option was provided for the admins to specify licensing configuration on the RD Connection Broker server. This would address the following concerns:- Lack of a GUI interface for specifying a licensing configuration on an RD Virtualization Host server, which makes it difficult for VDI administrators to configure this on multiple RemoteFX-enabled RD Virtualization Host servers.
- Licensing mode mismatch across the RD Session Host server configured for VM redirection and RD Virtualization Host servers. (Licensing mode inconsistency across the deployment leads to license wastage and/or potential service denials.)
How does centralized licensing management work?
As a part of this feature, the licensing settings (Remote Desktop license type and the list of specified Remote Desktop license servers) can be specified on the RD Connection Broker server. This feature also provides an option to turn centralized licensing management ON or OFF (in case the VDI administrator decides to configure licensing separately on different servers). A VDI administrator can configure centralized licensing management on the RD Connection Broker server by using one of the following:- Remote Desktop Connection Manager UI
- The Remote Desktop Services module for Windows PowerShell
Configuring licensing through the RD Connection Broker UI
- On the RD Connection Manager (sbmgr.msc) home page in the middle pane, there is an entry for RD Licensing under the Virtual Desktops: Resources and Configuration table. Click the Specify link that corresponds to RD Licensing to open Virtual Desktops Properties.
- When accessing centralized licensing for the first time, because it is disabled by default, all the other fields and buttons will be grayed out except the Apply the following settings to all servers check box.
- Enable central mode by selecting this check box, if it is not already enabled.
- Select the desired licensing mode, add the Remote Desktop license servers that you want to specify, and then click OK or Apply.
- These settings will be propagated to the RD Session Host server in redirection mode and all the RemoteFX-enabled RD Virtualization Host servers which are added on the RD Connection Broker server.
- As mentioned in Virtual Desktop Properties, the servers configured later will automatically inherit these licensing settings.
If the administrator decides that the licensing settings should not be centrally managed and wants to specify different licensing settings manually on different RD Virtualization Host servers, he can simply clear the Apply the following settings to all servers check box and specify licensing settings separately on all the RD Virtualization Host servers which have RemoteFX enabled.
Configuring licensing through the Remote Desktop Services module for Windows PowerShell
- On an elevated Windows PowerShell command prompt, execute the following command: ‘import-module remotedesktopservices;cd RDS:\connectionbroker\VirtualDesktops\LicensingSettings; ’
- This node displays licensing settings configured on the RD Connection Broker server.
- The UseCentralLicensingSettings property specifies whether to use the centralized licensing settings. The LicensingType property denotes the licensing type for the VM redirectors and RD Virtualization Host servers. The LicenseServers container contains the list of license servers to be used.
- Because central licensing is disabled by default, UseCentralLicensingSettings will be 0, LicensingType will be 5, and LicenseServers will be empty when accessing it for the first time.
- Execute the command set-item UseCentralLicensingSettings 1 to enable the central management of licensing settings. If enabling central management for the first time, the licensing type also needs to be specified in this command: set-item UseCentralLicensingSettings 1 –LicensingType <value>, where <value> is the desired value of the licensing type.
- Execute the command set-item LicensingType <value>, where <value> can be 2 (Per Device mode) or 4 (Per User mode).
- Execute the command new-item .\LicenseServers <value>, where <value> is the name of the license server, for each of the license servers that you want to specify.
- These settings will be propagated to the RD Session Host server in redirection mode and all the RemoteFX-enabled RD Virtualization Host servers that are added on the RD Connection Broker server.
- The servers configured later will automatically inherit these licensing settings.
If the administrator decides that the licensing settings should not be centrally managed and wants to specify different licensing settings manually on different RD Virtualization Host servers, he or she can simply execute set-item UseCentralLicensingSettings 0 and specify licensing settings separately on all the RD Virtualization Host servers that have RemoteFX enabled.