Activate RDS licenses for a Windows Server instance

更新时间:
复制 MD 格式

After you install Remote Desktop Service (RDS) on a Windows Server instance, it operates under a 120-day grace period. You must install and activate your purchased RDS CALs within this period. Otherwise, once the grace period expires, remote connections are blocked for standard users, and only the default administrator can log in.

Procedure

The following steps use Windows Server 2022 as an example.

Step 1: Activate the RDS license server

Register the current server with Microsoft to make it a valid license server. Ensure the instance has public network access.

  1. Log on to an ECS instance.

    1. Go to ECS console - Instances. In the top-left corner, select the region and resource group for the target instance.

    2. Navigate to the details page of the target instance. Click Connect and select Workbench. Set the connection method to Terminal Connection, enter your username and password, and log on to the graphical terminal.

  2. Right-click the Start icon 开始, click Run, enter licmgr, and press Enter to open the RD Licensing Manager.

  3. In the RD Licensing Manager, expand All Servers. Right-click the server name and click Activate Server.

  4. In the Activate Server Wizard, keep the connection method as the default Automatic connection. Enter your Company information, and then click Next through the remaining steps to complete the activation.

Step 2: Install RDS CALs

Install your purchased licenses on the activated license server.

  1. On the welcome page of the Install Licenses Wizard, click Next.

    This wizard usually opens automatically after you activate the server. If it does not open, right-click the server name in the RD Licensing Manager and select Install Licenses.
  2. On the License Program page, select the License Program that matches the license type you purchased, and then click Next.

    This example uses the Enterprise Agreement license program.

    This program is for users with 250 or more computers and requires the 7-digit enrollment number from your signed agreement, such as 1234567.

  3. Enter the Agreement number as prompted and click Next.

  4. On the Product Version and License Type page, configure the following settings.

    • Product version: Select a license version that is compatible with your instance's operating system. For example, a CAL for Windows Server 2022 can be used for servers running 2022, 2019, 2016, or earlier versions.

    • License type: For standalone or workgroup environments, select RDS Per Device CAL. The RDS Per User CAL mode requires a domain-based deployment. For more information, see the official Microsoft documentation.

    • Quantity: Enter the number of licenses you purchased. This number represents the maximum number of licenses the server can issue. Enter the number accurately to prevent license waste or violation of the license agreement.

  5. Click Next and wait for the license installation to complete. You can then view the installed licenses in the RD Licensing Manager.

    The license list shows the Windows Server 2022 - RDS CAL license. The license program is Volume License, the total number of licenses is 999, with 999 available and 0 issued, and the expiration date is Never.

Step 3: Configure the RD Session Host license server

Use Group Policy to specify that the Remote Desktop Session Host service obtains licenses from the local license server.

  1. Right-click the Start icon 开始, click Run, enter gpedit.msc, and press Enter to open the Local Group Policy Editor.

  2. In the Local Group Policy Editor, navigate to Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Licensing. Configure Use the specified Remote Desktop license servers and Set the Remote Desktop licensing mode.

  3. Double-click Use the specified Remote Desktop license servers. Select Enabled, enter the IP address or hostname of the license server in the License servers to use field, and then click OK.

    In this example, the license server and the session host are on the same instance, so enter 127.0.0.1.
  4. Double-click Set the Remote Desktop licensing mode. Set it to Enabled, select the licensing mode that matches the license type you installed in Step 2, and then click OK.

  5. Right-click the Start icon 开始, click Run, enter gpupdate /force, and press Enter to force an update of the local Group Policy. After the update is complete, restart the instance.

Step 4: Verify configuration and functionality

  1. Reconnect to the instance. Right-click the Start icon 开始, click Run, enter servermanager in the dialog box, and click OK to open Server Manager.

  2. In Server Manager, click All Servers. Right-click the server name and select RD Licensing Diagnoser.

    The RD Licensing Diagnoser shows a green check mark and reports that no licensing problems were identified for the Remote Desktop Session Host server. The configuration details are: the number of licenses available for clients is 999, the server version is Windows Server 2022, the Active Directory domain is Not Applicable, the licensing mode is Per Device, and the diagnoser shows 0 warnings.

  3. Right-click the Start icon 开始, click Run, enter licmgr in the dialog box, and click OK to open the RD Licensing Manager. Expand All Servers and click the server name to verify that the licenses are being issued correctly.

    The license list now shows license usage. For example, for the Windows Server 2022 - RDS CAL entry, you might see 2 issued licenses and 997 available licenses, confirming that allocation is working correctly.