How to Delete All RDS CALs from Windows Server
A guide for resetting licensing on Windows Server 2016, 2019, and 2022.
The process for deleting all Remote Desktop Services (RDS) CALs from a Windows Server can be done through a few different methods. The most reliable method is to rebuild the license database.
⚠️ Warning: Deleting the license database will permanently remove all installed RDS CALs from the server. Ensure you have a record of your CALs (e.g., license agreement, product key) before proceeding.
Method 1: Rebuilding the RDS Licensing Database
This method involves renaming the database file, which forces Windows to create a new, empty database. This effectively clears all installed licenses.
- Open the Services snap-in (
services.msc) or a PowerShell prompt as an administrator. - Stop the Remote Desktop Licensing service. In PowerShell, run:
Stop-Service TermServLicensing - Navigate to the directory: C:\Windows\System32\lserver
- Find the file named TLSLic.edb
- Rename this file to
TLSLic.edb.old(or simply delete it). - Start the Remote Desktop Licensing service. In PowerShell, run:
Start-Service TermServLicensing
All licenses will now be cleared. You will need to reinstall your RDS CALs if you wish to add them back.
Method 2: Using PowerShell to Uninstall Individual Packs
If you only want to remove a specific pack of CALs and not the entire database, you can use PowerShell.
- Open a PowerShell prompt as an administrator.
- To find the KeyPackId of the licenses you want to remove, run the following command:
Get-WmiObject Win32_TSLicenseKeyPack | select-object KeyPackId,ProductVersion,TypeAndModel,AvailableLicenses,IssuedLicenses | ft - Locate the KeyPackId of the license pack you want to remove.
- Run the following command (replace
Your-KeyPackIdwith the actual ID found above):
wmic /namespace:\\root\CIMV2 PATH Win32_TSLicenseKeyPack CALL UninstallLicenseKeyPackWithId Your-KeyPackId
This will remove only the specific CAL pack referenced by the ID.
Method 3: Deactivating the Server
You can also deactivate the entire license server, which will make it unable to issue licenses.
- Open Server Manager and navigate to:
Tools > Remote Desktop Services > Remote Desktop Licensing Manager - In the RD Licensing Manager, right-click on the server name and select Advanced > Deactivate Server.
- Follow the wizard to complete the deactivation process. This sends a request to the Microsoft Clearinghouse.
Author Bio
Microsoft Certified Professional
With over 20 years of experience deploying and managing enterprise Windows Server environments, Keloth leads technical implementation at RDS CAL Store. He specializes in Remote Desktop Services infrastructure, secure remote architecture, and helping IT teams seamlessly scale their official licensing.
Related Posts
How to Create a Remote Desktop User in Windows Server (2016, 2019, 2022 & 2025)
Home – How to Create a Remote Desktop User in Windows Server (2016, 2019, 2022 & 2025) How to Create a Remote Desktop User in Windows Server (2016, 2019, 2022 & 2025) Provisioning remote access for a new employee requires more than just creating a standard Windows account. To securely connect to a Session Host,…
How to Fix the CredSSP “Encryption Oracle Remediation” RDP Error
Home – How to Fix the CredSSP “Encryption Oracle Remediation” RDP Error How to Fix the CredSSP “Encryption Oracle Remediation” RDP Error If you are managing Windows Servers, you have likely encountered this terrifying error message when trying to connect via Remote Desktop: “An authentication error has occurred. The function requested is not supported… This…
How to Configure the RDS “Startup Environment” in Server 2016, 2019, 2022 & 2025
Home – How to Configure the RDS “Startup Environment” in Server 2016, 2019, 2022 & 2025 How to Configure the RDS “Startup Environment” in Server 2016, 2019, 2022 & 2025 If you recently upgraded your infrastructure, you likely noticed a glaring omission: Microsoft removed the Environment, Sessions, and Remote Control tabs from the Active Directory…
How to configure “Licensing Mode” and “License Server to Use” on a Windows Server
Home – How to configure “Licensing Mode” and “License Server to Use” on a Windows Server Configuring RDS Licensing Mode and License Server A guide for Windows Server 2016, 2019, 2022, and 2025. Configuring the Remote Desktop Services (RDS) licensing mode and license server on a Windows Server is a critical step for allowing more…