Event ID - 21

Event Id21
SourceMicrosoft-Windows-TerminalServices-Licensing
DescriptionThe Terminal Services license server "%1" does not have any remaining permanent Terminal Services client access licenses (TS CALs) of the type "%2". As a result, the Terminal Services license server cannot issue TS CALs of the type "%2" to the terminal server "%3". To resolve this problem, verify that the Terminal Services licensing mode configured on the terminal server matches the type of TS CALs installed on the Terminal Services license server. If required, purchase and install additional TS CALs as needed for this Terminal Services license server.
Event InformationAccording to Microsoft :
Cause :
This event is logged when Terminal Services license server does not have any remaining permanent Terminal Services client access licenses (TS CALs) of the type.
Resolution :
Check the licensing mode on the terminal server, and if necessary, install additional TS CALs
To resolve this issue, ensure that the Terminal Services licensing mode configured on the terminal server matches the type of Terminal Services client access licenses (TS CALs) installed on the Terminal Services license server. If the licensing mode on the terminal server matches the type of TS CALs installed on the license server, install addtional TS CALs of that type onto the license server.
Check the type of TS CALs installed on the license server
To perform this procedure, you must have membership in the local Administrators group, or you must have been delegated the appropriate authority.
To check the type of TS CALs installed on the license server:
  1. On the license server, open TS Licensing Manager. To open TS Licensing Manager, click Start, point to Administrative Tools, point to Terminal Services, and then click TS Licensing Manager.
  2. If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Continue.
  3. In the left pane, expand All Servers, and then click the license server. In the right pane, the type, version, and number of TS CALs installed on the license server is listed.
Check the licensing mode on the terminal server
To perform this procedure, you must have membership in the local Administrators group, or you must have been delegated the appropriate authority.
To check the Terminal Services licensing mode:
  1. On the terminal server, open Terminal Services Configuration. To open Terminal Services Confiiguration, click Start, point to Administrative Tools, point to Terminal Services, and then click Terminal Services Configuration.
  2. If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Continue.
  3. Under Licensing, double-click Terminal Services licensing mode.
  4. The licensing mode selected (either Per Device or Per User) should match the type of TS CALs installed on the terminal server.
  5. If the licensing mode is incorrectly configured, select the appropriate licensing mode, and then click OK.
Note : You can also specify the Terminal Services licensing mode for a terminal server by using Group Policy.
  • To specify the Terminal Services licensing mode for a terminal server by using Group Policy, enable the Set Terminal Services licensing mode Group Policy setting. This Group Policy setting is located in Computer Configuration\Administrative Templates\Windows Components\Terminal Services\Terminal Server\Licensing. Note that the Group Policy setting will take precedence over the setting configured in Terminal Services Configuration.
  • To configure the Group Policy setting in Active Directory Domain Services (AD DS), use the Group Policy Management Console (GPMC). To configure the Group Policy setting locally on a terminal server, use the Local Group Policy Editor.
Install TS CALs on to the license server
Note : The automatic TS CAL installation method requires Internet connectivity from the computer running the TS Licensing Manager tool. Internet connectivity is not required from the license server itself. This method uses TCP/IP (TCP port 443) to connect directly to the Microsoft Clearinghouse. You can also install TS CALs onto the license server by using a Web browser or by the using the telephone.
To perform this procedure, you must have membership in the local Administrators group, or you must have been delegated the appropriate authority.
To install TS CALs automatically:
  1. On the license server, open TS Licensing Manager. To open TS Licensing Manager, click Start, point to Administrative Tools, point to Terminal Services, and then click TS Licensing Manager.
  2. If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Continue.
  3. Ensure that the connection method for the Terminal Services license server is set to Automatic connection (recommended) by right-clicking the license server on which you want to install TS CALs, and then clicking Properties. On the Connection Method tab, change the connection method if necessary, and then click OK.
  4. Right-click the license server on which you want to install the TS CALs, and then click Install Licenses. The Install Licenses Wizard starts.
  5. Click Next.
  6. On the License Program page, select the appropriate program through which you purchased your TS CALs, and then click Next.
  7. The License Program that you selected on the previous page in the wizard will determine what information you will need to provide on this page. In most cases, you will have to provide either a license code or an agreement number. Consult the documentation provided when you purchased your TS CALs.
  8. After you have entered the required information, click Next.
  9. On the Product Version and License Type page, select the appropriate product version, license type, and quantity of TS CALs for your environment based on your TS CAL purchase agreement, and then click Next.
  10. The Microsoft Clearinghouse is automatically contacted and processes your request. The TS CALs are then automatically installed onto the license server.
  11. To complete the process, click Finish. The license server can now issue TS CALs to clients that connect to a terminal server.
Verify :
To verify that Terminal Services client access licenses (TS CALs) are installed and available on the Terminal Services license server, use the TS Licensing Manager tool.
To perform this procedure, you must have membership in the local Administrators group, or you must have been delegated the appropriate authority.
To verify that TS CALs are installed and available:
  1. On the license server, open TS Licensing Manager. To open TS Licensing Manager, click Start, point to Administrative Tools, point to Terminal Services, and then click TS Licensing Manager.
  2. If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Continue.
  3. In the left pane, expand All Servers, and then click the license server. In the right pane, the type, version, and number of TS CALs installed on the license server is listed.
Note : To verify that the terminal server can discover (contact) a Terminal Services license server with the appropriate type of Terminal Services client access licenses (TS CALs), use Licensing Diagnosis in the Terminal Services Configuration tool on the terminal server.
Reference LinksEvent ID 21 from Source Microsoft-Windows-TerminalServices-Licensing

Catch threats immediately

We work side-by-side with you to rapidly detect cyberthreats
and thwart attacks before they cause damage.

See what we caught

Did this information help you to resolve the problem?

Yes: My problem was resolved.
No: The information was not helpful / Partially helpful.