You can set the license type and specify the name of the license server from the Server Manager GUI, using PowerShell, or Group Policy. Configuring RDS Licenses on RD Session HostsĪfter the RDS License Server is activated and being run, you can reconfigure RD Session Host to obtain CAL licenses from this server. Rename the file C:\Windows\System32\lserver\TLSLic.edb to C:\Windows\System32\lserver\TLSLic.edb_bak and start the service:Īfter that, all RDS CAL licenses will be removed, and you must reactivate them. To do this, stop the Remote Desktop Licensing service: You can also completely remove all CALs by re-creating the RDS license database. Wmic /namespace:\\root\CIMV2 PATH Win32_TSLicenseKeyPack CALL UninstallLicenseKeyPackWithId yourKeyPackId Get-WmiObject Win32_TSLicenseKeyPack|select-object KeyPackId,ProductVersion,TypeAndModel,AvailableLicenses,IssuedLicenses |ftįind the KeyPackId value for the RDS CAL package that you want to remove and run the command: Using the following cmdlet, you can list all the installed RDS CAL packs on the server: If you want to move your RDS CAL license packs from one Remote Desktop licensing server to another, you can remove the installed RDS CAL license pack from the licensing server using PowerShell.
How to Remove RDS CALs from an RD License Server? $objArray | Export-Csv -Path $path -Delimiter ',' -NoTypeInformation $objArray.ExpirationDate = ::ParseExact($time, "yyyyMMddHHmmss", $null) $objArray += $entry | select User, ProductVersion, CALType, ExpirationDate $fileEntries = (Get-WmiObject Win32_TSLicenseReport | Where-Object FileName -eq $fileName).FetchReportEntries(0,0).ReportEntries $fileName = (Invoke-WmiMethod Win32_TSLicenseReport -Name GenerateReportEx).FileName
The following Powershell script will allow you to generate a Per User CAL Report: You can run this PowerShell script via Zabbix and set an alert if the remaining number of licenses is less, for example, 5. Write-Host "Total Licenses available: $available" $count2=(Get-Item -Path RDS:\LicenseServer\LicenseKeyPacks\$license\IssuedLicensesCount).CurrentValue $count=(Get-Item -Path RDS:\LicenseServer\LicenseKeyPacks\$license\TotalLicenses).CurrentValue $licenses = (Get-Item -Path RDS:\LicenseServer\LicenseKeyPacks\* | Where-Object Name -Like "-Per User-*").Name Set-Location -Path 'rds:' -ErrorAction Stop Import-Module RemoteDesktopServices -ErrorAction Stop The following script will show the remaining number of licenses in all RDS CAL packs: However, I prefer to use PowerShell to report RDS CAL usage. To do this, select Create Report -> CAL Usage from the server context menu. In the RDS License Console, you can generate a license usage report. Up to 20% of Per-Device RDS CALs can be revoked. $RevokePC = $TSLicensesAssigned | ? sIssuedToComputer -EQ $RevokedPCName $licensepacks = Get-WmiObject win32_tslicensekeypack | where
If you have run out of free RDS licenses, you can revoke previously issued RDS Device CALs for inactive computers using the following PowerShell script: You can convert RDS User CALs to Device CALs (and vice versa) using the Convert Licenses menu item in the RD Licensing Manager console. Specify the product version (Windows Server 2019/2016), license type (RDS Per user CAL), and the number of licenses to be installed on the server.Īfter that, the server can issue licenses (RDS CAL) to clients. If you have chosen License Pack (Retail Purchase), enter the 25-character product key you got from Microsoft or a partner. In the case of an Enterprise Agreement, you must specify its number. The next steps of the wizard depend on which license program you have selected. I think it won’t be a problem to find the numbers (4965437), you don’t even need to look for rds cracks or activators. Many enterprise agreement numbers for RDS have already been leaked on the Internet. To do it, select the Remote Desktop Services role in the Add Roles and Features Wizard.
You can install Remote Desktop Licensing using Server Manager. It is not necessary to install it on one of the servers on the RDSH farm.īefore you start the installation, add a new server to the Terminal Server License Servers domain security group (or make sure you have the permission to change this group membership), otherwise, the server won’t be able to issue RDS Per User CAL to the domain users. You can deploy the Remote Desktop License service on any domain server.
Install the Remote Desktop Licensing Role on Windows Server 2019/2016
Activating the RDS License Server on Windows Server.Install the Remote Desktop Licensing Role on Windows Server 2019/2016.