Event ID 40 — Terminal Services License Server Activation

Applies To: Windows Server 2008

To install and issue Terminal Services client access licenses (TS CALs), a Terminal Services license server must first be activated. When the license server is activated, Microsoft provides the license server with a limited-use digital certificate that validates server ownership and identity. Microsoft uses the X.509 industry standard certificate for this purpose. Using this certificate, a license server can make subsequent transactions with Microsoft.

Event Details

Product: Windows Operating System
ID: 40
Source: Microsoft-Windows-TerminalServices-Licensing
Version: 6.0
Symbolic Name: TLS_E_STORELSCERTIFICATE
Message: A certificate could not be installed for this server because of following error: %1!s!.

Resolve

Remove and then reinstall the TS Licensing role service

To resolve this issue, do the following:

  • Make a backup copy of the TS Licensing database folder
  • Uninstall (remove) the TS Licensing role service by using Server Manager. Removing TS Licensing will require you to restart the server.
  • Reinstall (add) the TS Licensing role service onto the computer by using Server Manager.

To perform these tasks, refer to the following sections.

Make a backup copy of the TS Licensing database folder

Before you remove the TS Licensing role service from the computer, make a backup copy of the folder that contains the TS Licensing database. This is good standard procedure and a backup can be useful if you need to contact Microsoft Customer Service and Support (CSS) to resolve this issue. When backing up a license server, back up both the System State data and the folder in which the TS Licensing database is installed. This ensures that data in both the registry and the TS Licensing database is backed up.

By default, the TS Licensing database is located in the %systemroot%\system32\lserver folder (where %systemroot% is the folder in which the operating system is installed, which is, by default, c:\windows).

To perform this procedure, you must have membership in the local Administrators group, or you must have been delegated the appropriate authority.

To confirm the location of the TS Licensing database:

  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, click All Servers, click the name of the license server, and then on the Action menu, click Review Configuration.
  4. The database location is listed at the top of the Configuration dialog box.

Uninstall (remove) the TS Licensing role service

To perform this procedure, you must have membership in the local Administrators group, or you must have been delegated the appropriate authority.

To uninstall (remove) the TS Licensing role service:

  1. On the license server, open Server Manager. To open Server Manager, click Start, point to Administrative Tools, and then click Server Manager.
  2. In the left pane, expand Roles.
  3. Right-click Terminal Services, and then click Remove Role Services.
  4. On the Select Role Services page, clear the TS Licensing check box, and then click Next.
  5. On the Confirm Removal Selections page, click Remove.
  6. On the Removal Progress page, removal progress will be noted.
  7. On the Removal Results page, you are prompted to restart the server to finish the removal process. Click Close, and then click Yes to restart the server.
  8. If you are prompted that other programs are still running, do either of the following:
    • To close the programs manually and restart the server later, click Cancel.
    • To automatically close the programs and restart the server, click Restart now.
  9. After the server restarts and you log on to the computer with the same user account, the remaining steps of the removal process will finish automatically. When the Removal Results page appears, confirm that the removal of TS Licensing succeeded, and then click Close.

Install (add) the TS Licensing role service

To perform this procedure, you must have membership in the local Administrators group, or you must have been delegated the appropriate authority.

To install (add) the TS Licensing role service:

  1. On the license server, open Server Manager. To open Server Manager, click Start, point to Administrative Tools, and then click Server Manager.

  2. In the left pane, right-click Roles, and then click Add Roles.

  3. In the Add Roles Wizard, on the Before You Begin page, click Next.

  4. On the Select Server Roles page, under Roles, select the Terminal Services check box, and then click Next.

  5. On the Terminal Services page, click Next.

  6. On the Select Role Services page, select the TS Licensing check box, and then click Next.

  7. On the Configure Discovery Scope for TS Licensing page, specify the discovery scope for the license server. For more information, see "Terminal Services License Server Discovery" in the TS Licensing Manager Help in the Windows Server 2008 Technical Library (https://go.microsoft.com/fwlink/?LinkId=101648).

    On the Configure Discovery Scope for TS Licensing page, you can also specify the location where the TS Licensing database will be stored. If you want to specify a database location other than the default location provided, click Browse. Note that the database location must be a local folder on the computer on which the TS Licensing role service is being installed.

  8. Click Next. On the Confirm Installation Selections page, ensure that the TS Licensing role service will be installed, and then click Install.

  9. On the Installation Progress page, installation progress will be noted.

  10. On the Installation Results page, confirm that installation for the TS Licensing role service succeeded, and then click Close.

For more information about configuring and managing the TS Licensing role service, see the TS Licensing Manager Help in the Windows Server 2008 Technical Library (https://go.microsoft.com/fwlink/?LinkId=101639).

Verify

To verify that the Terminal Services license server is activated, 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 the license server is activated:

  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, click All Servers.
  4. In the right pane, the Activation Status for the license server should be listed as Activated.

Terminal Services License Server Activation

Terminal Services