How to Configure RDS Licensing on Windows Server 2012 R2
Remote Desktop Services requires Client Access Licenses (CALs) for each user or device that connects to RD Session Host servers. Without properly configured and activated RDS licensing, sessions are limited to a 120-day grace period before connections are refused. The RD Licensing role service manages the issuance and tracking of RDS CALs. This guide covers installing and activating the license server, installing CALs, configuring the licensing mode, and troubleshooting common licensing issues.
RDS Licensing Modes
There are two RDS CAL licensing modes:
- Per User: Each user account connecting to RDS requires one CAL, regardless of how many devices they use to connect
- Per Device: Each device (computer or thin client) that connects to RDS requires one CAL, regardless of how many users share that device
Choose Per User licensing for environments where users roam between multiple devices. Choose Per Device for shared workstations or kiosk scenarios where multiple users share the same physical device. Note that Microsoft requires software assurance compliance monitoring — the licensing server tracks usage, but Microsoft may audit your CAL counts.
Prerequisites
- Windows Server 2012 R2 server for the license server role (can be the same server as RDCB or a dedicated server)
- Internet access or a phone/web activation method for the license server
- RDS CALs purchased from Microsoft or a volume licensing reseller
- Your Microsoft product key or agreement number for the CALs
Step 1 — Install the RD Licensing Role
Install-WindowsFeature -Name RDS-Licensing -IncludeManagementTools
Add the license server to the RDS deployment:
Add-RDServer -Server "rdlic.domain.com" -Role "RDS-Licensing" -ConnectionBroker "rdcb.domain.com"
Step 2 — Activate the License Server
The license server must be activated with Microsoft before it can issue CALs. Open RD Licensing Manager (licmgr.exe) on the license server:
- Right-click the server and select Activate Server
- Choose the activation method: Automatic (requires internet), Web Browser, or Telephone
- Provide company information when prompted
- Complete the activation wizard
Via PowerShell (automated online activation):
wmic /namespace:\rootCIMV2TerminalServices PATH Win32_TerminalServiceSetting WHERE (__CLASS !="") CALL SetSpecifiedLicenseServerList "rdlic.domain.com"
Step 3 — Install RDS CALs
After activating the license server, install your CALs:
- In RD Licensing Manager, right-click the activated server and select Install Licenses
- Choose your license program (Enterprise Agreement, Open License, Retail, etc.)
- Enter your product key or agreement/authorisation number
- Specify the product version (Windows Server 2012 R2) and license type (Per User or Per Device)
- Enter the quantity of CALs
- Complete the wizard
Step 4 — Configure Licensing Mode and Server
Point the RDS deployment to the license server and set the licensing mode:
Set-RDLicenseConfiguration -LicenseServer "rdlic.domain.com" -Mode PerUser -ConnectionBroker "rdcb.domain.com" -Force
Verify the configuration:
Get-RDLicenseConfiguration -ConnectionBroker "rdcb.domain.com"
Step 5 — Configure Licensing via Group Policy
For environments without a Connection Broker (standalone Session Host), configure licensing through Group Policy:
- Open Group Policy Management Console
- Navigate to Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > RD Session Host > Licensing
- Enable Use the specified Remote Desktop license servers and enter the license server name
- Enable Set the Remote Desktop licensing mode and select Per User or Per Device
Via registry (equivalent to GPO, applied on Session Host servers):
Invoke-Command -ComputerName "rdsh01.domain.com" -ScriptBlock {
$RegPath = "HKLM:SOFTWAREPoliciesMicrosoftWindows NTTerminal Services"
Set-ItemProperty -Path $RegPath -Name "LicenseServers" -Value "rdlic.domain.com" -Type String
Set-ItemProperty -Path $RegPath -Name "LicensingMode" -Value 4 -Type DWord # 2=PerDevice, 4=PerUser
}
Step 6 — Monitor CAL Usage
Monitor how many CALs have been issued versus how many are available:
# View issued CALs via WMI:
Get-WmiObject -Class "Win32_TSIssuedLicense" -Namespace "rootCIMV2TerminalServices" -ComputerName "rdlic.domain.com" | Select-Object sIssuedToUser, sIssuedToComputer, ExpirationDate, LicenseId
In RD Licensing Manager, the Reports node provides detailed views of CAL usage, including Per User report (RD CAL usage report) and Per Device report.
Check available vs. issued counts:
Get-WmiObject -Class "Win32_TerminalServiceSetting" -Namespace "rootCIMV2TerminalServices" -ComputerName "rdsh01.domain.com" | Select-Object LicensingType, PolicySourceConfiguredLicenseServers
Step 7 — Add the License Server to the RDS Servers Group
For the license server to issue CALs, it must be a member of the RDS Endpoint Servers or Terminal Server License Servers security group in Active Directory:
Import-Module ActiveDirectory
Add-ADGroupMember -Identity "Terminal Server License Servers" -Members "rdlic$"
Troubleshooting Licensing Issues
Sessions limited to 120-day grace period: The license server is not reachable or not properly configured. Verify network connectivity between Session Hosts and the license server on TCP port 135 (RPC) and 5985 (WinRM).
“No license server available” error: The Session Hosts cannot contact the license server. Check the licensing server name in Group Policy or the Connection Broker configuration.
# Check licensing server connectivity from a Session Host:
Test-NetConnection -ComputerName "rdlic.domain.com" -Port 135
CALs being issued to computers that shouldn’t use RDS: In Per Device mode, any device that connects receives a CAL automatically. Revoke CALs for devices that should not have them using RD Licensing Manager’s Revoke CAL function (limited revocations allowed per policy).
Summary
RDS Licensing on Windows Server 2012 R2 requires careful setup to ensure compliance and uninterrupted service. The license server must be activated online and loaded with sufficient CALs before the grace period expires. Choosing the right licensing mode (Per User vs Per Device) based on your environment’s access patterns is a critical decision. Regular monitoring of CAL usage via RD Licensing Manager helps you plan for additional CAL purchases before capacity is exhausted and new connections start being refused.