Windows Server provides a 120-day grace period after you install Remote Desktop Service (RDS). You must install and activate your purchased Remote Desktop Services Client Access Licenses (RDS CALs) within this grace period. Otherwise, when the grace period expires, standard users cannot connect remotely, and only the default administrator can log in.
Procedure
This example uses Windows Server 2022.
Step 1: Activate the RDS license server
Register the server with Microsoft to activate it as a license server. Ensure that the Elastic Compute Service (ECS) instance has Internet access.
Log on to the ECS instance.
Go to ECS console - Instances. In the top navigation bar, select the target region and resource group.
Go to the details page of the target instance, click Connect, and select Workbench. Set the connection method to Terminal, enter the username and password, and then log on to the graphical terminal page.
Right-click the Start icon
, then click Run. Enter licmgrand press Enter to open the RD Licensing Manager.In the RD Licensing Manager, expand All Servers, right-click the server name, then click Activate Server.

In the Activate Server Wizard, keep the default connection method, Automatic connection. Fill in your Company, then click Next and follow the prompts to complete the activation.

Step 2: Install RDS CAL
Install your purchased licenses on the activated license server.
On the Activate Server Wizard welcome page, click Next.
The wizard typically opens automatically after you activate the server. If the wizard does not open automatically, right-click the server name in the RD Licensing Manager and select Install Licenses.

On the License Program page, select the License program that matches your license type, then click Next.
This example uses the Enterprise Agreement license program.

Enter the Agreement number as prompted, then click Next.
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, you can use a CAL for Windows Server 2022 for servers running Windows Server 2022, 2019, 2016, or earlier versions.
License type: Select RDS Per Device CAL for a standalone server or workgroup environment. The RDS Per User CAL mode requires a domain-based deployment. For details, see the official Microsoft documentation.
Quantity: Enter the number of licenses you purchased. This is the maximum number of licenses the server can issue. Enter the number accurately to avoid wasting licenses or violating the license agreement.

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

Step 3: Configure the RDS Host license server
Use Group Policy to configure the RDS Host service to retrieve licenses from the local license server.
Right-click the Start icon
, then click Run. Enter gpedit.mscand press Enter to open the Local Group Policy Editor.In the Local Group Policy Editor, navigate to . Configure the Use the specified Remote Desktop license servers and Set the Remote Desktop licensing mode policies.

Double-click Use the specified Remote Desktop license servers. Select Enabled. In the License servers to use field, enter the IP address or hostname of the license server, then click OK.
In this example, the license server and the session host are on the same instance, so enter
127.0.0.1.
Double-click Set the Remote Desktop licensing mode. Select Enabled, choose the licensing mode that matches the license type you installed in Step 2, then click OK.

Right-click the Start icon
, then click Run. Enter gpupdate /forceand press Enter to force an update of the local Group Policy. After the update is complete, restart the instance.
Step 4: Verify the configuration and functionality
Reconnect to the instance. Right-click the Start icon
, then click Run. Enter servermanagerand click OK to open Server Manager.In Server Manager, click All Servers. Right-click the server name and select RD Licensing Diagnoser.

The configuration is successful if the diagnoser reports no issues, as shown in the following figure.

Right-click the Start icon
, then click Run. Enter licmgrand press Enter to open the RD Licensing Manager. Expand All servers and click the server name. Verify that licenses are being issued correctly.