Terminal Server License Service Discovery Part 2


In part 1 of this article, we discussed the detailed process of how terminal servers discover license servers. In part 2, we build on that information to show you how to better control the process and how to troubleshoot discovery when it fails.


Using the LicenseServers Registry Key


All terminal servers first check their LicenseServers registry key for hints on finding license servers. Beginning with Windows Server 2003 SP1, the Terminal Server installation wizard allowed you to specify how you want discovery to operate, and to optionally specify the license servers in which to populate the LicenseServers registry key. Figure 4 shows this screen.



Figure 4: Terminal Server Setup


The three options are better described below:



  • Use these license servers – This option allows you to specify known license servers, either by NetBIOS name, fully-qualified domain name (FQDN) or by IP address. Multiple entries can be separated using commas.
  • Use automatically discovered license servers – This option selects automatic discovery.
  • I will specify a license server within 120 days – This option leaves discovery in manual mode, but does not specify any license servers. In this case, license servers will need to be added later using the Terminal Services Configuration applet. The licensing grace period is 120 days, in which the terminal server can accept connections without contacting a license server. After 120 days, a license server must be available.

By specifying your environment’s license servers up front, the discovery process is essentially overridden, avoiding most issues with license servers not being found.


If the incorrect option was selected during the installation, it can be changed in the Terminal Services Configuration applet. Under Server Settings, double-click Terminal services discovery mode.



Figure 5: Changing License Server Discovery Options


As seen in figure 5, this applet mirrors the options in the installation wizard. This dialog also displays any license servers that have been automatically discovered, reflecting the information in the terminal server’s license server registry cache.


License servers can also be added directly to the LicenseServers registry key. Before Windows Server 2003 SP1 this was the only way to add preferred license servers and it is still used today as a means of scripting the license server locations, either for automating deployment or updating configuration. As mentioned in part 1, the following registry keys are used to preemptively store license server names.














OS Version


Location of LicenseServers key


Windows Server 2003


HKLM\System\CurrentControlSet\Services\TermService\Parameters \LicenseServers


Windows 2000 Server


HKLM\System\CurrentControlSet\Services\TermService\Parameters


For Windows Server 2003 terminal servers, create a new key under LicenseServers with the name of the license server. One key must be created for each license server, and it’s probably best to use fully-qualified domain names to avoid issues with IP address changes down the road.


On Windows 2000 terminal servers, you may only identify a single license server. This is done by creating a new REG_SZ value called DefaultLicenseServer, with the data being the NetBIOS name of the license server.



Improving Automatic Discovery Success


If you want your terminal servers to exclusively use automatic discovery to find the license servers, there are some logistical decisions that you can make to improve the chances of success.


For terminal servers that are not a member of an Active Directory domain, the only way license servers are automatically discovered is via NetBIOS broadcast. Therefore, these terminal servers must be located on the same local subnet as the license server for it to be found; otherwise, you must configure a preferred license server.


Beginning with Windows Server 2003, it is no longer required that the license server be installed on a domain controller; however Domain role license servers will only be automatically discovered if they are on installed on a domain controller. If not, then the terminal servers must be preconfigured with the name of a preferred license server.


Enterprise role license servers will be automatically discovered provided the license server and terminal servers are in the same Active Directory site, regardless of whether or not the license server is on a domain controller. If there is a difference in Active Directory site affiliation, then the license server must be on a domain controller, or preferred license servers must be configured.



Troubleshooting Discovery


Always remember to check the Windows event logs, as they may contain useful information. The following events are common when terminal servers are having trouble discovering license servers.



  • Event ID 1010 – The terminal services could not locate a license server
  • Event ID 1009 – The terminal server licensing grace period is about to expire on <date> and the service has not registered with a license server with installed licenses

Starting with the basic troubleshooting steps, first make sure the Terminal Server Licensing service is started on the license server, and try to PING the license server by both name and IP address from the terminal servers.


If all that checks out, determine if all terminal servers are having trouble contacting the license server, or if it is only a select few. If all terminal servers are having trouble, the problem most likely lies in either the discovery process or network connectivity issues. Problems with only a select few terminal servers may be due to network isolation issues or different site affiliation with the license server.


Another useful tip is to verify the mode of the license server. The following registry key will indicate the license server role:


HKLM\System\CurrentControlSet\Services\TermServLicensing\Parameters\Role


A value of 0 means it is a Domain/Workgroup license server, and a value of 1 indicates an Enterprise license server. Remember, a Domain license server must be on a domain controller to be automatically discovered, and if an Enterprise license server is not on a domain controller, it must be in the same Active Directory site as the terminal servers.


Finally, if the license server in question is an Enterprise license server, check Active Directory to be sure the site license object was created when the service was installed. Using ADSIEDIT fro the Windows Server 2003 Resource Kit, browse the configuration container and locate the following object:


LDAP://CN=TS-Enterprise-License-Server,CN=<sitename>,CN=sites,CN=configuration, DC=<domainname>,DC=com


If the Role registry key indicates this is an enterprise license server (role=1) and this object does not exist in Active Directory, there was probably a rights issue with the administrator who installed the service. The simplest way to remedy this is to just uninstall the license servers and reinstall it.


Using LSVIEW


The LSVIEW utility from the Windows Server 2003 Resource Kit will display any discovered license servers when run on a terminal server. In figure 6, a single Enterprise license server has been discovered on server DC1.



Figure 6: LSVIEW


LSVIEW also allows you to create a diagnostic log file, which will show some additional details of the discovery process (figure 7).



Figure 7: Configuring a log file in LSVIEW


By logging diagnostic information the resulting log file, shown in figure 8, displays the results of the discovery process.



Figure 8: LSVIEW log file output


You will notice there are two sections to the log file – the Domain license server discovery (in blue and orange) and Enterprise license server discovery (in green). In this example, there was one Enterprise license server and one Domain license server in an environment with two domain controllers – dc1 and dc2.


The domain license server discovery process checked both DCs in the domain and identified a license server on dc1.domain.com, but not on dc2.domain.com. It also performed an LDAP query to Active Directory and located an Enterprise license server on lic1.domain.com.



Final Notes on Best Practices


By far, the best way to ensure license servers are always found is to configure a preferred license server on each of the terminal servers and avoid the discovery process altogether. However, the following guidelines summarize ways to improve the discoverability of your license servers.



  • A license server that is installed on a domain controller will always be discovered by terminal servers that are a member of the same domain.
  • If you insist on not installing the license server on a domain controller, be sure to use an Enterprise license server and place one in each Active Directory site that contains terminal servers.
  • For terminal servers that are not a member of an Active Directory domain, the license server must be on the same local subnet so it can be discovered via NetBIOS broadcast.

Finally, the table below provides a quick reference for discoverability of license servers based on where the license server is installed and its role. This table assumes that the terminal server is a member of the same Active Directory domain.




















License Server


Terminal Server -> License Server Discoverability


Domain role on a member server


Will not be automatically discovered


Domain role on a DC


Always automatically discovered


Enterprise role on a member server


Will be discovered if in the same Active Directory site


Enterprise role on a DC


Always automatically discovered

Leave a Comment

Your email address will not be published.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Scroll to Top