If you encounter this error

Then please follow these steps to resolve this issue
Step 1: Login to your server and search for Edit group policy

Step 2: Navigate to the following path
Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Licensing.

Step 3: Open “Use the specified Remote Desktop license servers“

Enable it, change License servers to use to localhost, and click OK

Step 4: Open “Set the Remote Desktop licensing mode“

Tick Enabled and then click OK

