大网数据广告活动
远程桌面与会话

Remove Terminal Server licenses from a Remote Desktop Protocol (RDP) client

· 52CE 我爱测

Describes how to remove Terminal Server licenses from an RDP client.

This article describes how to remove Terminal Server licenses from a Remote Desktop Protocol (RDP) client.

Original KB number:   187614

Summary

When an unlicensed client connects to a Terminal Server for the first time, the Terminal Server issues the client a temporary Terminal Server Client Access License (CAL) token. After the user has logged into the session, the Terminal Server instructs the License Server to mark the issued temporary Terminal Server CAL token as being validated. The next time the client connects, an attempt is made to upgrade the validated temporary Terminal Server CAL token to a full Terminal Server CAL token. If no license tokens are available, the temporary Terminal Server CAL token will continue to function for 90 days. The license is stored in the client's registry.

32-bit RDP clients store their license under the key HKEY_LOCAL_MACHINE\Software\Microsoft\MSLicensing.

Important: This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, see How to back up and restore the registry in Windows.

Clean RDP client's license cache

To clean the client's license cache, just delete this key and its subkeys. The next time the client connects to the server, it will obtain another license.

For 16-bit RDP clients, run regedit /v. Then delete the keys under \Software\Microsoft\MSLicensing to clean the client's license cache. You can also delete the BIN files from \Windows\System\Regdata.

The RDP client for Macintosh stores the license in a file on the local computer in the folder hierarchy under /users/Shared/Microsoft/RDC Crucial Server Information/. To clean the Macintosh client's license cache, delete the contents of this folder. The client will try to obtain a new license from the server the next time that it connects.

If you delete the HKEY_LOCAL_MACHINE\Software\Microsoft\MSLicensing subkey on a client that is running Windows Vista or a later version, later attempts to connect to a Terminal Server may fail. Also, you receive the following error message:

An Error occurred in the Licensing Protocol

To resolve this problem, right-click the Remote Desktop Connection shortcut, and then select Run as Administrator. By default, the remote desktop connection runs as a user with the lowest user permissions. By default, a restricted user doesn't have permission to write registry entries to HKEY_LOCAL_MACHINE. Therefore, attempts to rewrite the MSLicensing key fail. Starting Remote Desktop Connection with administrative credentials provides the permissions that are necessary to write the needed registry keys.

Did this fix the problem

Check whether the problem is fixed. If the problem isn't fixed, contact support.

Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / IT Pro troubleshooting
适用范围
- Supported versions of Windows Server · Source date 02/12/2026
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。