Troubleshooting: Remote Desktop Licensing Error on Windows Server RDSH

Table of Contents

This article addresses a specific behavior observed in Windows Server 2008 R2, where administrators on a Remote Desktop Session Host (RDSH) server may encounter licensing errors during diagnosis. This situation arises even when the licensing infrastructure is correctly configured. It is important to understand that this is often an expected behavior due to permission constraints rather than a genuine licensing problem.

Symptoms

Consider the following scenario which outlines the steps to reproduce the licensing diagnosis error on a Windows Server 2008 R2 environment:

  1. Begin by installing the Remote Desktop Licensing role service on a designated server running Windows Server 2008 R2. This server will act as your license server, managing the RDS licenses for your environment.

  2. Next, on a separate computer, install the Remote Desktop Session Host role service. This server will be the RDSH server where users will connect to run applications and desktops remotely. Ensure this server is also running Windows Server 2008 R2.

  3. After successfully installing both role services, access the Remote Desktop Session Host Configuration MMC snap-in. This can be done by running tsconfig.msc from the command prompt or the Run dialog on the RDSH server. This tool allows you to configure various settings related to the Remote Desktop Session Host.

  4. Within the Remote Desktop Session Host Configuration MMC, navigate to the left panel and select the Licensing Diagnosis item. This section is designed to help administrators identify potential licensing issues with the RD Session Host server.

Licensing Diagnosis Error

In this specific scenario, after clicking on Licensing Diagnosis, you might encounter the following error message displayed within the MMC snap-in:

Licenses are not available for this Remote Desktop Session Host server, and Licensing Diagnosis has identified licensing problems for the RD Session Host server.
Number of licenses available for clients: 0

Licensing Diagnosis Information - 1 error(s)…
Problem: To identify possible licensing issues, administrator credentials for license server %servername% are required.
Suggested Resolution: Provide administrator credentials for the Remote Desktop Services license server.

This error message indicates that the Licensing Diagnosis tool is reporting a problem. It suggests that licenses are not available and points to a requirement for administrator credentials on the license server to further diagnose the issue. However, it’s crucial to understand the context of this message in relation to administrator accounts.

Cause

The root cause of this seemingly alarming error message is not necessarily a lack of licenses or a misconfiguration of the licensing server. Instead, it stems from the permissions of the user account performing the Licensing Diagnosis. Specifically, the error arises because the user account currently running the query does not possess administrator privileges on the Remote Desktop Licensing server.

The Licensing Diagnosis tool, when attempting to gather licensing information, employs a Windows Management Instrumentation (WMI) method to communicate with and query the licensing server. WMI is a powerful management framework in Windows that allows for system administration and monitoring. However, certain WMI methods, particularly those dealing with security-sensitive information like licensing, require elevated privileges to access.

In this case, the WMI method used by the Licensing Diagnosis tool to retrieve licensing data mandates that the querying user account must have administrator-level access on the Remote Desktop Licensing server. This requirement is by design and is implemented for security reasons to prevent unauthorized access to licensing information.

Therefore, if you are logged in with a user account that is an administrator on the RDSH server but not an administrator on the Remote Desktop Licensing server, you will encounter this error message. The Licensing Diagnosis tool is functioning as intended by highlighting the insufficient permissions to perform a comprehensive license check. It is not necessarily indicating a problem with the licensing service itself, but rather a limitation in the diagnostic tool’s ability to gather complete information due to user permissions.

To visualize this, consider the interaction between the RDSH server, the Licensing Diagnosis tool, and the Licensing Server:

mermaid graph LR A[RDSH Server (Admin User)] --> B(Licensing Diagnosis Tool); B --> C{WMI Query to Licensing Server}; C -- No Admin Privileges --> D[Error: Insufficient Permissions]; C -- Admin Privileges --> E[Successful License Query]; E --> B; B --> F[Display License Status]; style D fill:#f9f,stroke:#333,stroke-width:2px style E fill:#ccf,stroke:#333,stroke-width:2px

This diagram illustrates that the Licensing Diagnosis tool on the RDSH server initiates a WMI query to the Licensing Server. If the user running the tool lacks administrator privileges on the Licensing Server, the query fails due to insufficient permissions, resulting in the error message. Conversely, if the user has the necessary administrator rights, the query succeeds, and the tool can display the accurate license status.

Resolution

The solution to resolve this error message and enable the Licensing Diagnosis tool to function correctly is straightforward. You need to grant the querying user account administrator privileges on the Remote Desktop Licensing Server.

Specifically, you should add the user account that is being used to run the Licensing Diagnosis tool on the RDSH server to the local Administrators group on the Remote Desktop Licensing Server. This action will elevate the user’s permissions on the Licensing Server, granting them the necessary access to the WMI methods used by the Licensing Diagnosis tool.

Here are the steps to add a user account to the local Administrators group on the Remote Desktop Licensing Server:

  1. Log in to the Remote Desktop Licensing Server using an account that already has administrative privileges.

  2. Open Computer Management. You can do this by right-clicking on the Start button and selecting “Computer Management,” or by searching for “Computer Management” in the Start Menu.

  3. In the Computer Management window, expand Local Users and Groups in the left-hand pane.

  4. Select the Groups folder.

  5. In the right-hand pane, locate and double-click on the Administrators group. This will open the Administrators Properties dialog box.

  6. In the Administrators Properties dialog box, click the Add… button.

  7. In the “Select Users, Computers, or Groups” dialog box, enter the name of the user account that you are using on the RDSH server to run the Licensing Diagnosis tool. You can click the Check Names button to verify that the account name is correct. If the Licensing Server and RDSH server are in different domains, you may need to specify the domain as part of the username (e.g., domain\username).

  8. Click OK to close the “Select Users, Computers, or Groups” dialog box.

  9. Click OK again to close the Administrators Properties dialog box.

After completing these steps, the user account will be a member of the local Administrators group on the Remote Desktop Licensing Server. Log off and log back in with the user account on the RDSH server for the changes to fully take effect.

Now, when you run the Licensing Diagnosis tool again from the RDSH server using this user account, it should be able to successfully query the licensing information from the Remote Desktop Licensing Server without encountering the “insufficient permissions” error. The tool should now display the accurate licensing status of your RD Session Host server.

It is important to remember that granting administrator privileges should be done with caution and only when necessary. In this specific scenario, granting temporary administrator rights to perform licensing diagnosis might be acceptable for troubleshooting purposes. However, for ongoing monitoring and management, consider using alternative methods that do not require elevated privileges, or implement more granular permission delegation if possible. Always adhere to your organization’s security policies and best practices when managing user permissions.

Data Collection

While the provided article does not explicitly mention data collection in the context of automated troubleshooting, it’s worth noting that in real-world scenarios, collecting relevant data is crucial for effectively diagnosing and resolving issues. For Remote Desktop Licensing errors, valuable data points to collect might include:

  • Event Logs: Examine the System and Application event logs on both the RDSH server and the Remote Desktop Licensing server for any relevant error or warning events related to licensing. Look for events with sources like “TermServLicensing,” “RDS Licensing,” or “Application Errors.”

  • Licensing Diagnosis Tool Output (with Admin Credentials): Run the Licensing Diagnosis tool after granting administrator privileges as described in the resolution. Capture the full output of the tool, including any warnings, errors, and detailed licensing information. This will provide a comprehensive snapshot of the licensing status.

  • RD Licensing Diagnoser: Windows Server includes a built-in tool called “RD Licensing Diagnoser” (lsdiag.msc). This tool can also be used to diagnose licensing issues. Run this tool on the RDSH server and review its findings. It may provide more detailed information than the basic Licensing Diagnosis within the Server Manager MMC.

  • Registry Settings: Certain registry keys related to Remote Desktop Licensing can provide valuable information about the configuration and licensing mode. However, modifying the registry should be done with extreme caution. Consult official documentation before making any changes.

  • Network Connectivity: Verify network connectivity between the RDSH server and the Remote Desktop Licensing server. Licensing relies on network communication, so ensure there are no firewall rules or network issues blocking communication on the necessary ports.

By systematically collecting and analyzing this data, you can gain a deeper understanding of the licensing environment and pinpoint the root cause of any licensing errors, whether they are related to permissions, configuration, or other underlying issues.

If you continue to experience issues after implementing the resolution and reviewing the data collection points, further investigation may be required. Consult official Microsoft documentation for Remote Desktop Services licensing, or consider seeking assistance from Microsoft support or a qualified IT professional.


This article explains a specific scenario where a licensing diagnosis error can occur due to insufficient administrator privileges. By understanding the cause and applying the provided resolution, administrators can accurately assess the licensing status of their RD Session Host servers. Remember to always consider user permissions and security best practices when troubleshooting and managing your Windows Server environment.

If you found this article helpful, or if you have encountered similar licensing issues, please feel free to leave a comment below and share your experiences! Your feedback can help others facing similar challenges.

Post a Comment