Windows server 2016 remote desktop services per user client access license

Сервер Remote Desktop Licensing используется для выдачи и отслеживания клиентских терминальных лицензий RDS (CAL). Согласно схеме лицензирования Microsoft все пользователи, или устройства, подключающиеся к графическому сеансу рабочего стола RDS, должны быть лицензированы. В этой статье мы рассмотрим, как установить и активировать роль сервера лицензирования удаленных рабочих столов на хосте с Windows Server 2022, 2019 и 2016, а также как установить клиентские лицензии RDS CAL.

Содержание:

  • Установка роли Remote Desktop Licensing в Windows Server
  • Активация сервера лицензий RDS на Windows Server
  • Установка клиентских лицензий RDS CAL в Windows Server
  • Настройка серверов RDSH на использование сервера лицензий RDS
  • Управление клиентскими лицензиями CAL на RDS

Установка роли Remote Desktop Licensing в Windows Server

Компонент Remote Desktop Licensing можно установить на любом хосте Windows Server (не обязательно устанавливать его на одном из серверов фермы RDS). Если вы разворачиваете хост RD Licensing в домене AD, добавьте сервер во встроенную группу Terminal Server License Servers (иначе сервер не сможет выдать CAL типа RDS Per User пользователям домена).

Состав этой группы позволяют быстро найти все хосты с лицензиями RDS в домене.

Установите службу Remote Desktop Licensing через консоль Server Manager (Add Roles and Features -> Remote Desktop Services -> Remote Desktop Licensing.

Remote Desktop Licensing - служба лицензирования терминалов

Дождитесь окончания установки роли.

установка службы Remote Desktop Licensing

Также вы можете в Windows Server установить компонент лицензирования RDS и инструменты управления RD Licensing с помощью PowerShell:
Install-WindowsFeature RDS-Licensing –IncludeAllSubFeature -IncludeManagementTools

Выведите установленные компоненты RDS на сервере и проверьте, что RDS-Licensing и RDS-Licensing-UI установлены:

Get-WindowsFeature -Name RDS* | Where installed

powershell проверить какие службы RDS установлены на Windows Server

Для управления службой RDS-Licensing используются две консоли:

  • Remote Desktop Licensing Manager (
    licmgr.exe
    )
  • RD Licensing Diagnoser (
    lsdiag.msc
    )

Консоли управления сервером лицензирования RDS

Активация сервера лицензий RDS на Windows Server

Чтобы сервер лицензирования RDS мог выдавать лицензии клиентам, его необходимо активировать. Откройте консоль Remote Desktop Licensing Manager (
licmgr.exe
), щелкните ПКМ по имени вашего сервера и выберите пункт меню Activate Server.

активация сервера терминальных лицензий

В мастере активации сервера лицензирования RDS нужно выбрать, хотите ли вы активировать сервер через интернет, с помощью браузера или по телефону.

выберите метод активации сервера лицензирования

Далее нужно будет заполнить ряд информации о вашей организации (часть полей является обязательными).

информация об организации и компании

Нажмите кнопку Finish. Должна появится надпись:

The license server has been successfully activated.

сервер лицензирования RDS успешно активирован

Щелкните в консоли по имени сервера и выберите Review Configuration. В этом примере сервер лицензий RDS активирован и может выдавать лицензии клиентам в домене AD.

This license server is a member of the Terminal Server License Servers group in Active Directory. This license server will be able to issue RDS Per User CALs to users in the domain, and you will be able to track the usage of RDS Per User CALs.
This license server is registered as a service connection point (SCP) in Active Directory Domain Services.

Review Configuration

Установка клиентских лицензий RDS CAL в Windows Server

Теперь на сервер лицензирования нужно установить приобретенный вами пакет терминальных лицензий (RDS CAL, client access license). Есть два типа терминальных CAL:

  • На устройство (Per Device CAL) – лицензия назначается на устройство (компьютер). Дает право подключения к RDS серверам с одного устройства любому количеству пользователей. При первом подключении устройства к RDS ему назначается временная лицензия, а при втором – постоянная. Лицензия не являются конкурентными, это означает что если у вас 10 лицензий Per Device, то к вашему RDS серверу смогут подключится всего 10 компьютеров. Актуальная OVL лицензия называется так:
    Win Remote Desktop Services CAL 2022 SLng OLV NL AP DCAL
  • На пользователя (Per User CAL) – лицензия позволяет одному пользователю подключаться к RDS с любого количества компьютеров. Этот тип лицензии привязывается к учетной записи пользователя в Active Directory, но выдается не навсегда, а на срок от 52 до 89 дней (случайное число). Актуальная Open Value лицензия этого типа называется так:
    Win Remote Desktop Services CAL 2022 SLng OLV NL AP UCAL
    .

    Если вы разворачиваете RDSH сервер в рабочей группе (не в домене), используйте лицензирование на устройство (Per Device RDS CAL). Иначе RDSH сервер будет каждые 60 минут завершать сеанс пользователей с сообщением: “Проблема с лицензией удаленных рабочих столов и ваш сеанс будет завершен через 60 мин / There is a problem with your Remote Desktop license, and your session will be disconnected in 60 minutes ”.

    Проблема с лицензией удаленных рабочих столов и ваш сеанс будет завершен через 60 мин

Клиентские лицензия RDS которые вы используете должны быть совместимы с версией Windows Server, к которой подключается пользователь или устройство. Следующая таблица позволяет определить совместимость RDS CAL с версий Windows Server на сервере лицензирования RDS:

2008 R2 СAL 2012 CAL 2016 CAL 2019 CAL 2022 CAL
2008 R2 Yes No No No No
2012 Yes Yes No No No
2012 R2 Yes Yes No No No
2016 Yes Yes Yes No No
2019 Yes Yes Yes Yes No
2022 Yes Yes Yes Yes Yes

Примечание. RDS CAL для новых версий Windows Server нельзя установить на предыдущие версии WS. Например, вы не сможете установить 2022 RDS CAL на хост лицензирования Windows Server 2016. При попытке установить новые лицензии на старую версию Windows Server появится ошибка:

rds ошибка неверный код при добавлении лицензий RDS CAL

RD Licensing Manager
The license code is not recognized. Ensure that you have entered the correct license code.

В консоли Remote Desktop Licensing Manager щелкните по серверу и выберите Install Licenses.

Выберите способ активации (автоматически, через веб или по телефону) и программу лицензирования (в нашем случае Enterprise Agreement).

В сеть утекло уже довольно много enterprise agreement номеров для RDS (4965437). Найти номера думаю, не составит проблемы. Обычно даже не нужно искать кряки или активаторы.

программа лицензирования Enterprise Agreement

Следующие шаги мастера зависят от того, какой тип лицензирования выбран. В случае Enterprise Agreement нужно указать его номер. Если выбран тип лицензирования License Pack (Retail Purchase), нужно будет указать 25-символьный ключ продукта, полученный от Microsoft или партнера.

номер лицензионного соглашения

Укажите тип продукта (Windows Server 2022, 2019 или 2016), тип RDS CAL и количество терминальных лицензий, которые нужно установить на сервере.

тип и количество RDS лицензий

Если нужно сконвертировать RDS лицензии User CAL в Device CAL (или наоборот), щелкните по пакету лицензий в консоли RD Licensing Manager и выберите Convert Licenses.

сонвертировать rds cal из user в device

Настройка серверов RDSH на использование сервера лицензий RDS

После установки роли RDSH на Windows Server пользователю могут использовать его в течении пробного (grace) периода 120 дней, после чего они не смогут подключиться к RDS. Чтобы ваши RDSH хосту могли получать CAL лицензии с RDS License сервера и выдавать их устройствам/пользователям, нужно указать адрес сервера с RDS лицензиями в настройках терминальных серверов RD Session Host.

Можно задать адрес сервера лицензирования в настройка коллекции на RDSH. Откройте Server Manager -> Remote Desktop Services -> Collections. В правом верхнем меню выберите Tasks -> Edit Deployment Properties.

rds изменить настройки Edit Deployment Properties

Перейдите на вкладку RD Licensing, выберите тип лицензирования (Per user или Per device в зависимости от имеющихся лицензий) и адрес сервера RDS. Нажмите Add -> Ok.

rdsh изменить параметры лицензирования хоста

Можно задать настройки сервера лицензирования RDS через групповые политики. В домене нужно создать нужно создать новую GPO в консоли GPMC и назначить ее на OU с RDS серверами (либо вы можете указать имя сервера лицензирования RDS с помощью локального редактора групповых политик –
gpedit.msc
).

Перейдите в раздел Computer Configuration -> Policies -> Admin Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Session Host -> Licensing и настройте два параметра.

  • Use the specified Remote Desktop license servers – укажите имя или IP адрес сервера лицензирования RDS;
  • Set the Remote Desktop licensing mode – выбор тип клиентских лицензий (RDS CAL).

GPO - data-lazy-src=

Если вы установили RDSH на ознакомительной редакции Windows Server Evaluation, нужно конвертировать его в полноценную версию согласно инструкции. Без конвертации службы RDSH на таком хосте будут работать только 120 дней даже после того, как вы нацелите его на активированный сервер лицензий RDS.

Также можно задать имя сервера лицензирования RDS и тип CAL с помощью PowerShell. Если у вас развернут посредник RDS Connection Broker, можно изменить настройки лицензирования с помощью команды:

Set-RDLicenseConfiguration -LicenseServer @("rds-lic01.winitpro.loc") -Mode PerDevice -ConnectionBroker "rdcb01.winitpro.loc"

Либо вы можете указать адрес сервера лицензирования и тип лицензий в реестре с помощью PowerShell команд:

# Тип лицензирования RDS 2 – Per Device CAL, 4 – Per User CAL
$RDSCALMode = 4
# Имя сервера лицензирования RDS
$RDSlicServer = "rds-lic01.winitpro.loc"
New-Item "HKLM:\SYSTEM\CurrentControlSet\Services\TermService\Parameters\LicenseServers"
New-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Services\TermService\Parameters\LicenseServers" -Name SpecifiedLicenseServers -Value $RDSlicServer -PropertyType "MultiString"
Set-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\Licensing Core\" -Name "LicensingMode" -Value $RDSCALMode

Хосты RDSH для получения лицензий с сервера RDS Licensing обращаются к нему по следующим портам. Убедитесь, что они не блокируются межсетевыми экранами (или Windows Firewall):

  • TCP/135 (Microsoft RPC)
  • UDP/137 (NetBIOS Datagram Service)
  • UDP/138 (NetBIOS Name Resolution)
  • TCP/139 (NetBIOS Session Service)
  • TCP/445 (SMB)
  • TCP 49152 – 65535 — RPC динамический диапазон адресов

Вы можете проверить доступность портов с помощью утилиты PortQry или командлета Test-NetConnection.

Запустите утилиту Remote Desktop Licensing Diagnoser (
lsdiag.msc
) на RDSH хосте и проверьте, что он видит сервер лицензирования и количество доступных RDS CAL.

RD Licensing Diagnoser did not identify any licensing problems for the Remote Desktop Session Host server.

RD licensing diagnoser: проверить подключение к серверу лицензирования

Если сервер сервера лицензий RDS не задан, или недоступен, в консоли Licensing Diagnoser будут присутствовать следующие предупреждения:

Licenses are not available for this Remoter Desktop Session Host server, and RD Licensing Diagnose has identified licensing problems for the RDSH
Number of licenses available for clients: 0
The licensing mode for the Remote Desktop Session Host server is not configured
Remote Desktop Session Host server is within its grace period, but the RD Session Host server has not been configured with any license server.

rds diagnoser недоступны лицензии

Примечание. В нашем случае после указания нового сервера лицензирования, на RDP клиенте при подключении стала появляться ошибка
The remote session was disconnected because there are no Remote Desktop License Servers available to provide a license
. Решение – удаление ключа L$RTMTIMEBOMB из реестра.

Можете подключиться к RDSH серверу с клиента и проверить, что сервер лицензирования назначил RDS CAL подключению. Откройте консоль Event Viewer и перейдите Applications and Services Logs -> Microsoft -> Windows -> TerminalServices-Licensing -> Operational. Событие успешной выдачи RDS CAL с Event ID 82 будет содержать такую надпись:

The "Temporary"  Windows Server 2022 : RDS Per Device CAL belonging to computer "DESKTOP-S6G9U9C" has been upgraded to "Permanent" Windows Server 2022 : RDS Per Device CAL.

Логи выдачи RDS лицензий в Event Viewer

Управление клиентскими лицензиями CAL на RDS

Рассмотрим несколько типовых инструментов администратора при управлении RDS CAL на сервере лицензирования.
Вы можете в консоли управления RD Licensing Manager отчет об использовании лицензий RDS CAL. Для этого в контекстном меню сервера выберите Create Report -> CAL Usage.

Вывести информацию по установленным и используемым лицензиям RDS CAL с помощью PowerShell:

Get-WmiObject Win32_TSLicenseKeyPack|select-object KeyPackId,ProductVersion,TypeAndModel,AvailableLicenses,IssuedLicenses |ft

rdc licensing cal Win32_TSLicenseKeyPack

Если у вас закончились свободные лицензии, вы можете отозвать ранее выданные лицензии RDS Device CAL для неактивных компьютеров из консоли (правой кнопкой по лицензии и выберите Revoke License.

RDS CAL отозвать лицензию

Также вы можете отозвать RDS CAL с помощью скрипта PowerShell:

$RevokedPCName=”msk-pc2332”
$licensepacks = Get-WmiObject win32_tslicensekeypack | where {($_.keypacktype -ne 0) -and ($_.keypacktype -ne 4) -and ($_.keypacktype -ne 6)}
$licensepacks.TotalLicenses
$TSLicensesAssigned = gwmi win32_tsissuedlicense | where {$_.licensestatus -eq 2}
$RevokePC = $TSLicensesAssigned | ? sIssuedToComputer -EQ $RevokedPCName
$RevokePC.Revoke()

Можно отозвать до 20% Per-Device RDS CALs. Per-User CALs отозвать нельзя.

In this article, we will explore the process of installing, configuring, and activating the Remote Desktop Licensing role on Windows Server 2019 and 2016. Additionally, we will cover the steps for installing and activating the RDS client access licenses (CALs). Let’s start configuring the Windows license server.

It’s important to note that, following the installation of the Remote Desktop Session Host role, users can utilize the license during a 120-day trial period (evaluation license). After this trial period, users won’t be able to connect to an RDS host. Following Microsoft’s licensing guidelines, all users or devices that make use of RDS functionalities must be properly licensed. To handle the registration and issuance of Remote Desktop Client Access Licenses (RDS CALs), the RDS role incorporates a distinct Windows service known as the Remote Desktop License Server.

Install the Remote Desktop Licensing Role on Windows Server 2019/2016

You have the flexibility to set up the Remote Desktop License service on any domain server; there’s no requirement to install it on one of the servers within the RDSH farm.

Before we start the installation, ensure that you either add a new server to the Terminal Server License Servers domain security group or (have the necessary permissions to modify this group’s membership). Otherwise, the server will be unable to grant RDS Per User CALs to domain users.

To install Remote Desktop Licensing, you can use Server Manager. To begin, choose the Remote Desktop Services role within the Add Roles and Features Wizard.

install remote desktop services role

Select Remote Desktop Licensing as the role service. You can also select the following six services depending on your requirements.

remote desktop services licensing service

You have to wait until the role installation is completed.

rds licensing feature installation

The RDS-Licensing service is managed using the Remote Desktop Licensing Manager console (licmgr.exe).

If you want to install the RDS Licensing Service and RD Licensing Diagnoser, start Windows PowerShell as an administrator and execute the command below.

Install-WindowsFeature RDS-Licensing –IncludeAllSubFeature -IncludeManagementTools

install the RDS Licensing Service and RD Licensing diagnoser using PowerShell

After that, you have to Reboot the machine. After the server reboot. We can Check if the “RD Session Host”, RDS Licensing service and “Remote Desktop Licensing” are available using Below Powershell command below.

Get-WindowsFeature | where name -Like “rds*”
Get-WindowsFeature | where name -Like “remote*”

check available RDS servers using Below PowerShell command

Now we have successfully installed the Remote Desktop Licensing Role. The second step is to Activate the RDS License Server on Windows Server.


To issue licenses to RDP clients, it’s necessary to activate your RDS License Server. To activate your server you have to open Licensing Manager. There are 2 methods to open a licensing manager.

Method 1:

Open the Server Manager and from the Tools menu go to Remote Desktop Services > Remote Desktop Licensing Manager. 

How to open remote desktop licensing manager

Method 2:

The alternative method to open the RD Licensing Manager .exe file which is located on the Administrative Tools folder. The Administrative Tools directory can be found in one of the following locations:

  • Go to Windows Start >> Control Panel >> System and Security >> Administrative Tools >> Remote Desktop Services >> Double click “Remote Desktop Licensing Manager”
  • Go to Windows Start >> Control Panel >>All Control Panel Items >> Administrative Tools >> Remote Desktop Licensing Server

Open licensing manager from administrative tools

Method 3:

You can also run licmgr.exe cmd on the run panel to open the licensing manager.

Open licensing manager using command licmgr.exe

Once the licensing manager page opens you then have to expand the Server section by clicking the plus icon. Then to initiate this process, right-click on your server’s name, and then choose the ‘Activate Server’ option.

Activate RDS License Server on windows server

Now the RDS licensing server activation wizard will appear on your screen. Here in the drop-down, you have to selst connection methods.

If your server has internet connectivity, it can automatically establish a connection with Microsoft servers to activate the RDS license server. In cases where no direct internet access is unavailable from the server, you can activate the server through a web browser or by using a phone.

Licensing manager Connection Methods

Enter your company information (your name, the company name, your geographic region), and then click Next.
Optionally enter any other company information (for example, email and company addresses), and then click Next.

It remains to click the Finish button.

Make sure that the ‘Start Install Licenses Wizard‘ option is not checked (we’ll install the RDS licenses in a subsequent step), and then click ‘Next.

If you right-click the server name in the console and select Review Configuration, you can verify that the RDS License Server is activated and can be used to activate RDSH clients in your domain.

By right-clicking on the server name within the console and choosing ‘Review Configuration,’ you can confirm that the RDS License Server is activated and ready for use in activating RDSH clients within your domain.

Licensing server Review Configuration

This Completes the Activate RDS License Server steps. Now Let’s Proceed with the Install RDS Licence section.


RDS CALs: Types of Remote Desktop Client Access Licenses

Every user or device that connects to Remote Desktop Session hosts requires a client access license (CAL). There are two categories of RDS CALs:

RDS User CALs (Client Access Licenses)

  • User-Based Licensing: RDS User CALs are assigned to individual users. Each user who needs to access the RDS environment requires a separate User CAL.
  • Flexible: Ideal for scenarios where users need to access the RDS environment from multiple devices (e.g., work computer, personal computer, mobile device).
  • Licensing Users: Licenses are tied to specific named users, allowing those users to access RDS from any device.
  • User Mobility: Suited for users who are often on the go and access the RDS environment from various locations and devices.

Note: These licenses are not concurrent, i.e., if you have 10 Per Device licenses, only 10 hosts can connect to your RDS server.

RDS Device CALs (Client Access Licenses):

  • Device-Based Licensing: RDS Device CALs are assigned to specific devices (computers or thin clients). Each device that accesses the RDS environment needs its own Device CAL.
  • Cost-Effective for Shared Devices: If several users share a single device to access the RDS environment (e.g., in a public library or on a shop floor), Device CALs can be more cost-effective.
  • Licensing Devices: Licenses are tied to specific devices, allowing any user who logs in to the licensed device to access the RDS environment.
  • Device Dedication: Suited for scenarios where devices are dedicated to specific tasks or locations and multiple users use those devices to access RDS.

Note: This type of license is associated with an Active Directory user and issued not permanently but for a specific period. The license is issued for a period of 52 to 89 days (random number).

RDS 2008 R2 and earlier CAL RDS 2012 CAL RDS 2016 CAL RDS 2019 CAL RDS 2022 CAL
Windows 2008, 2008 R2 session host Yes Yes Yes Yes Yes
Windows 2012 session host No Yes Yes Yes Yes
Windows 2012 R2 session host No Yes Yes Yes Yes
Windows 2016 session host No No Yes Yes Yes
Windows 2019 session host No No No Yes Yes
Windows 2022 session host No No No No Yes
RDS 2008 R2 and earlier CAL RDS 2012 CAL RDS 2016 CAL RDS 2019 CAL RDS 2022 CAL
Windows 2008, 2008 R2 license server Yes No No No No
Windows 2012 license server Yes Yes No No No
Windows 2012 R2 license server Yes Yes No No No
Windows 2016 license server Yes Yes Yes No No
Windows 2019 license server Yes Yes Yes Yes No
Windows 2022 license server Yes Yes Yes Yes Yes

If you try to use RDS 2019 Per User CAL in a workgroup (not in a domain), then the RDSH server will automatically terminate a user’s session every 60 minutes, displaying a message: ‘Remote Desktop License Issue: There is a problem with your Remote Desktop license, and your session will be disconnected in 60 minutes”. Therefore, for RDS servers in a Windows Workgroup environment, you need to use only device licensing (Per Device RDS CALs).

Remote Desktop License Issue 60 Minutes On Windows


Installing RDS CALs on Windows Server 2019/2016

Now we need to install RDS CALs which we have purchased for RDS Licensing Server. For that, we need to open a Licensing Manager:

Open the Server Manager and from the Tools menu go to Remote Desktop Services > Remote Desktop Licensing Manager.

Now you have to Right-click on your server listed in Remote Desktop Licensing Manager and select Install Licenses.

Install RDS License Cals

In the next step, we have to select the activation method (Automatic, Online, or by Phone) and the license program (in our case, it is Enterprise Agreement).

rds cal enterprise agreement

rds cal enterprise agreement setup

The next steps of the wizard will vary depending on the license program you have opted for. If you are using an Enterprise Agreement, you will need to specify its number. On the other hand, if you have selected a License Pack (Retail Purchase), you should input the 25-character product key provided by Microsoft or a certified partner.

Specify the product version (Windows Server 2022/2019/2016), the license type (RDS Per User CAL), and the number of licenses that you intend to install on the server.

Install RDS cals on licensing server

Once the process is completed, your server can issue licenses (RDS CAL) to clients. You can access all the license details on the right side of the licensing manager, including the number of CALs issued and the number that remains available. Additionally, you have the option to convert RDS User CALs to Device CALs (or vice versa) using the ‘Convert Licenses’ menu item within the RD Licensing Manager console.

Convert User Cals to Device Cals

Note: In case you have run out of free RDS licenses, you have the option to reclaim previously issued RDS Device CALs for inactive computers. Up to 20% of Per-Device RDS CALs can be revoked. Per-User CALs cannot be revoked.


How to Create RDS CAL Usage Reports

Within the RDS License Console, you can generate a license usage report. To initiate this process, go to the server menu located on the left side, then select “Create Report” and choose “CAL Usage.


Configuring RDS Licenses on RD Session Hosts

Once the RDS License Server has been activated and is operational, you can reconfigure the RD Session Host to acquire CAL licenses from this server. This can be achieved through the Server Manager GUI, by using PowerShell, or by configuring it through Group Policy.

To modify the name or address of the licensing server on the RDS host, follow these steps:

  1. Open Server Manager.
  2. Navigate to “Remote Desktop Services” and select “Collections.”
  3. In the upper-right menu, click on “Tasks.”
  4. Choose “Edit Deployment Properties.”

RDS Edit Deployment Properties

After that RDS deployment properties will pop up in front of the screen and you have to select RD Licensing select the Remote Desktop licensing mode, and set the RDS license server. Click Add >> OK.

set rd license server

If you want to configure the RDS licensing server parameters through Group Policy, you should create a new Group Policy Object (GPO) and link it to the Organizational Unit (OU) containing your RDS servers.

Alternatively, you can specify the licensing server’s name using the Local Group Policy Editor (gpedit.msc). The RD licensing settings can be found within the following GPO section: Computer Configuration -> Policies -> Administrative Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Session Host -> Licensing.

There are two Remote Desktop settings that we need to configure:

  • Use the specified Remote Desktop license servers – the address of the License Server is set; (if you have more than one server, use commas to separate their names).
  • Set the Remote Desktop licensing mode – select RDS CAL license type.

Remote Desktop Licensing Mode is not Configured

Can not connect to RDS because no RD Licensing servers are available

To monitor the RD License Server status and track the number of issued licenses, you can utilize the Remote Desktop Licensing Diagnoser tool. This tool can be accessed through either lsdiag.msc or by navigating to Administrative Tools and selecting “Remote Desktop Services,” and then choosing “RD Licensing Diagnoser.”

If the Remote Desktop Licensing Diagnoser is not already installed on your RDSH servers, you can add it using Server Manager. Navigate to “Features” and then select “Remote Server Administration Tools” -> “Role Administration Tools” -> “Remote Desktop Services Tools” -> “Remote Desktop Licensing Diagnoser Tools.

If the RDSH server is not configured to use an RDS license server, the following warnings will appear in the Licensing Diagnoser console:

  • Licenses are not available for this Remote Desktop Session Host server, and RD Licensing Diagnose has identified licensing problems for the RDSH.
  • Number of licenses available for clients: 0
  • The licensing mode for the Remote Desktop Session Host server is not configured.
  • The Remote Desktop Session Host server is within its grace period, but the RD Session Host server has not been configured with any license server.

rd licensing diagnoser licenses are not available

If there are no warnings, and you see the message “RD Licensing Diagnoser did not identify any licensing problems for the Remote Desktop Session Host server”, then the RDSH server can successfully receive RDS CALs for remote users and/or devices.

RD Licensing Diagnoser

We hope after this article you can easily configure the Windows license server without any problem. We hope you have found this article helpful. If you have any questions or suggestions, please don’t hesitate to comment in the section below. We will certainly reply to your comments. Also, feel free to share this article with your friends. Thank you!

In this blog post we will look at how to install and activate a Remote Desktop License Server on Windows Server 2016. We will also review the two different types of CALs, and how to install CALs on the RD License Server. Finally, we will look at how to designate specific License Servers to RD Session Host Servers, through PowerShell and Group Policy.

If you don’t have Remote Desktop Services Client Access Licenses (RDS CALs), your users will not be able to connect to a remote desktop session host server, after the initial grace period of 120-days expires. To install Remote Desktop Services CALs, you first need to install Remote Desktop Licensing. This is a role service of the Remote Desktop Services role on Windows Server 2016. You can use RD Licensing to install, issue, and track the availability and usage of licenses.

If you have Windows Server 2016 session host servers, then the RD Licensing role service must be installed on a Windows Server 2016 machine, because 2016 RDS CALs can only be installed on a Server 2016 RD license server.

Citrix XenApp also relies on a RD license server. Because what XenApp essentially does, is to extend the capabilities of the Microsoft Remote Desktop session host server. Each time a user connects to a XenApp session, he is also connecting to a Remote Desktop Session. So you will need licenses for both XenApp and RDS.

Keep in mind, the license server we set up in this blog post, will only be used to issue licenses to session host servers that will host shared desktops and deliver applications in a Citrix XenApp environment. Such a deployment will only have RD session host servers and license server(s). There will be no Remote Desktop Connection Broker.

Navigation

1. Installing the Role Service
2. Activating the server
3. Types of CALs
4. Install CALs
5. Specify Licensing Mode and License server for RD Session Host Servers

.

1. Installing the Role Service

Before you start, you should add the designated license server to the Terminal Server License Servers group in Active Directory. Otherwise, you will not be able to issue RDS Per User CALs to users in the domain, and you will not be able to track or report the usage of RDS Per User CALs on the License Server.

1.1 Start the Add Roles and Features Wizard in Server Manager
1.2 Click Next

1.3 Select Role-based or feature-based installation, click Next

1.4 Select the local server, click Next
1.5 Select Remote Desktop Services, click Next

1.6 Click Next
1.7 Click Next again

1.8 Select Remote Desktop Licensing (click Add Features when prompted), click Next

1.9 Click Install

1.10 Click Close when the installation is finished

.

2. Activating the server

The license server must be activated to issue RD CALs.
2.1 In Server Manager, Click ToolsRemote Desktop ServicesRemote Desktop Licensing Manager

2.2 Right click the server name, and select Activate Server

2.3 Click Next

2.4 Select desired connection method. I’m selecting Automatic connection, which connects to the Microsoft clearinghouse over the internet, by using https. If your license server does not have access to the internet, you can also choose to activate it through the web browser (of another computer, which is connected to the internet) or over telephone. Click Next

2.5 You will be requested to provide some information about yourself. These four fields are required, so enter information for each field

2.6 These fields are optional. Click next when you are ready

2.7 The server will be activated
2.8 You can start the Install Licenses Wizard if you like from this page, but I chose not to


2.10 If you right-click the server name, and select Review Configuration, you can review the configuration of the RD license server.

.

3. Types of CALs

Each user and device that connects to a Remote Desktop Session host needs a client access license (CAL). There are two types of Client Access Licenses available in this type of setup.

Per Device CALs
These are permanent CALs assigned to any computer or device that connects to an RD Session Host Server more than once. The first time a computer or device connects to an RD Session Host, its by default issued a temporary license. The second time a computer or device connects to an RD Session Host, the license server issues it a permanent RDS Per Device CAL, if the license server is activated and enough RDS Per Device CALs are available. In other words, Per Device CALs can not be overallocated, meaning if you have 15 CALs, only 15 devices will be able to make a connection to session hosts.


Per User CALs

Per User CALs give users right to access Remote Desktop Services from any number of devices. They are not assigned to users permanently like Device CALs are to devices. Rather they are valid only for a set period of time, and are assigned to the user account in Active Directory. Licensing for Per User CALs is not enforced, so they can be overallocated, meaning even if you only have 15 CALs, more than 15 users will be able to make a connection to session hosts. So its up to you to ensure that you stay in compliance with the Microsoft RDS Licensing agreement.

.

4. Install CALs

4.1 Right-click server, and select Install Licenses

4.2 The connection method you used during activation is retained (to change it, use the properties dialog box of the license server). Click Next

4.3 Select appropriate License Program, and then click next.

4.4 The next few steps will depend on the license program you selected in the previous step. These are the steps for Enterprise Agreement
4.5 Enter Agreement number, click Next

4.6 Select Product Version, license type and quantity of licenses to install onto the license server. Then click Next and follow the wizard to complete the license installation process.

The license server can now issue RDS CALs to clients.

.

5. Specify Licensing Mode and License server for RD Session Host Servers

The Remote Desktop Session Host Configuration Tool was removed in Windows Server 2012 R2, and isn’t present in Server 2016 either. So you will have to specify licensing mode and licensing server through other means. Since we are not dealing with a full-blown deployment of Remote Desktop Services here, but rather just session host servers that we will use for the purpose of hosting shared desktops and deliver applications on Citrix XenApp, we can not define the licensing server in Server Manager. Rather, we will have to use either PowerShell or Group Policy.

5.1 Through PowerShell

Run the following three cmdlets in PowerShell on the session host server

$obj = gwmi -namespace "Root/CIMV2/TerminalServices" Win32_TerminalServiceSetting
$obj.ChangeMode(4)
$obj.SetSpecifiedLicenseServerList("server03.shabaztech.com")

In cmdlet number two, the value of 4 specified that the licensing mode will be Per User. If you want to use Per Device licensing mode, then you will have to enter 2 instead.

Finally, run this cmdlet to verify that the specified license server was set correctly.

$obj.GetSpecifiedLicenseServerList()

5.2 Through Group Policy

The settings can be found in the following location, and they are self-explanatory.

Computer Configuration → Policies → Admin Templates → Windows Components → Remote Desktop Services → Remote Desktop Session Host → Licensing

(The configured GPO must be linked to your session host servers)

Another interesting setting can be found at the following location

Computer Configuration → Policies → Admin Templates →Windows Components → Remote Desktop Services → RD Licensing

With this setting you can control which RD Session Host servers are issued RDS CALs by the license server. It must be configured in a GPO that is applied to the license server.

5.3 Remote Desktop Licensing Diagnoser

You can use RD Licensing Diagnoser to check licensing configuration details for a session host server. You can also use it to help identify possible licensing problems.

Upper portion gives information about licensing configuration details on the session host server.
Middle portion gives diagnostic information and suggested resolutions for any problems.
Lower portion gives information on which license servers the session host is configured with.

  • Заметки
  • Windows

01.08.2019

Добавление ролей и компонентов

Установка самой оси Microsoft Windows Server 2016 в рамках данной статьи рассматриваться не будет, только отдельно сама установка терминального сервера.
На будущем терминальном сервере открываем диспетчер сервера через Панель управления (Win + R Control) — АдминистрированиеДиспетчер серверов (Server Manager)
или через команду «Выполнить» (Win + R ServerManager). После чего переходим по вкладке Локальный сервер (Local Server)

Открываем мастер добавления ролей и компонентов, жмём далее, в типе установки отмечаем радиокнопкой пункт Установка ролей или компонентов (Role-based or feature-based installation),
выбираем сервер, жмём далее, чекбоксом отмечаем Службы удаленных рабочих столов. В службах ролей отмечаем для установки две службы: Лицензирование удаленных рабочих столов (Remote Desktop Licensing) и Узел сеансов удаленных рабочих столов (Remote Desktop Session Host),
жмём далее и потом установить. Дожидаемся конца установки и перезагружаем сервер, если это не было сделано автоматически по завершению установки.

Активация лицензии удалённых рабочих столов

СредстваRemote Desktop ServicesДиспетчер лицензирования удаленных рабочих столов (RD Licensing Manager).
Раскрываем древо, правой кнопкой по нашему серверу вызываем выпадающее меню и выбираем пункт активировать сервер.

В мастер активации сервера вначале заполняем сведения об организации, а после устанавливаем саму лицензию. При выборе программы лицензии указываем Другое соглашение,
и указываем ключи активации купленной лицензии 6565792 (или любой другой. Для тестового сервера нагуглите за 2 минуты:»номер соглашения windows server 2016«. Ключ 6565792 — также является результатом выдачи поисковика google).
Выбираем версию продукта Windows Server 2016и тип лицензии Клиентская лицензия служб удаленных рабочих столов (на пользователя). Готово!

Но Средство диагностики лицензирования удаленных рабочих столов сообщает нам, что сервер лицензирования не включён. Чтож, поправим это дело через политики. Вызываем
командное меню «Выполнить» Win + R gpedit.msc. Переходим: Конфигурация компьютера (Computer Configuration) — Административные шаблоны (Administrative Templates) — Компоненты Windows (Windows Components) — Службы удаленных рабочих столов (Remote Desktop Services) — Узел сеансов удаленных рабочих столов (Remote Desktop Session Host) — Лицензирование (Licensing).

Тут поправим Использовать указанные серверы лицензирования удаленных рабочих столов (Use the specified Remote Desktop license servers) и Задать режим лицензирования удаленных рабочих столов (Set the Remote licensing mode).

Обновляем сведения в оснастке Средство диагностики лицинзирования удаленных рабочих столов (Win + R lsdiag.msc). Теперь всё ок!

Изменение стандартного порта подключения

Стандартный порт для RDP подключения: 3389

Открываем реестр (Win + R regedit), переходим по ветке:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp

Находим ключ PortNumber, меняем систему исчисления на Десятичную и задаем необходимый номер порта.
Так же это можно сделать через командную строу:

reg add "HKLM\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v PortNumber /t REG_DWORD /d НОВЫЙ_НОМЕР_ПОРТА /f

А чтобы вы потом смогли подключиться по новому порту, то вам в фаервол нужно прописать правило

netsh advfirewall firewall add rule name="RDP PORT НОВЫЙ_НОМЕР_ПОРТА" dir=in action=allow protocol=TCP localport=НОВЫЙ_НОМЕР_ПОРТА

И перезапустить службу

net stop TermService && net start TermService

Возможные проблемы

Подключение было запрещено

Скорее всего вы при попытке подключиться увидите сообщение:»Подключение было запрещено, так как учетная запись пользователя не имеет прав для удаленного входа в систему«,
а всё из-за того, что 1 — терминальный сервер не настроен в домене на разрешение подключения к нему определённых пользователей; 2 — вы не добавили в группу Пользователи удаленного рабочего стола ни одного пользователя.

Возможно вам будет полезна статья о том как из Windows 10 сделать Терминальный сервер.

CredSSP

Ещё можете столкнуться с такой вот ошибкой: An authentication error has occurred. The function is not supported. This could be due to CredSSP encryption oracle remediation.

О ней я писал ранее в статье:»Ошибка RDP подключения: CredSSP encryption oracle remediation. Как исправить?».

А возникновение этой ошибки связано с тем, что на терминальном Windows сервере, на который идёт подключение, не установлены последние обновления безопасности (CredSSP обновления для CVE-2018-0886). После обновления система по умолчанию запрещает подключаться к удалённым серверам по RDP со старой версией протокола CredSSP.

Отсутствуют доступные серверы лицензирования удаленных рабочих столов

После настройки сервера всё шло хорошо, но только 120 дней. Потом случилось следущее:

Удаленный сеанс отключен, поскольку отсутствуют доступные серверы лицензирования удаленных рабочих столов.
Обратитесь к администратору сервера

А это означает что у вас установлен ключ льготного периода (grace period licensing), который необходимо удалить. Для этого вам нужно залогиниться на сервер локально.
Где удалять ключ льготного периода? В реестре под именем L$RTMTIMEBOMB. Идём по ветке реестра:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\GracePeriod

Но не тут то было! У вас недостаточно прав, но и это нас не остановит. Жмём правой кнопкой мыши и меняем владельца на ветку реестра и даём полные права самому себе, после чего спокойно удаляем эту гадость).
Если не поможет, то советую переустановить роли и компоненты.

Автору на кофе ☕ или просто поднять мотивацию писать больше статей для вас 😉 !

Отдельное спасибо всем, кто отправляет донатики 😀! Очень приятно и неожиданно. Благодаря вам сайт может и в дальнейшем обходиться без рекламных баннеров.

Для настройки терминального сервера к нему распространяются ниже представленные требования исходя из ПО, которое будет запускаться пользователями и количества пользователей:

  • Процессор: от 4 ядер
  • Оперативная память : 1 ГБ на каждого пользователя + 4 ГБ для работы ОС + 4 ГБ запас
  • Дисковая система: для большей отказоустойчивости нужно настроить RAID-массив
    Для установки выделить два диска: первый логический диск от 50 ГБ. До 100 ГБ выделить для установки ОС, второй логический диск выделить под пользовательские профили с расчетом минимум 1 ГБ на пользователя
  • Ширина канала для терминального сервера: 250 Кбит/с на пользователя

Бесплатный сервер 1С для подписчиков нашего telegram-канала !

У нас вы можете взять терминальный сервер 1С в аренду с бесплатными индивидуальными настройками.

Первоначальные настройки Windows Server 2016:

  1. Настроить статический IP-адрес сервера
  2. Проверить правильность настройки времени и часового пояса
  3. Установить все обновления системы
  4. Задать понятное имя для сервера и, при необходимости, ввести его в домен
  5. Включить доступ до сервера по удаленному рабочему столу для удаленного администрирования
  6. Настроить запись данных профилей пользователей на второй логический диск
  7. Активировать лицензию Windows Server 2016

Настройка терминального сервера

Начиная с Windows 2012 терминальный сервер должен работать в среде Active Directory.

Если в вашей локальной сети есть контроллер домена, просто присоединяйте к нему сервер терминалов, иначе установите на сервер роль контроллера домена.

Установка роли и компонентов

В панели быстрого запуска открываем Диспетчер серверов:

Нажимаем Управление – Добавить роли и компоненты:

Нажимаем Далее до «Выбор типа установки». Оставляем Установка ролей и компонентов и нажимаем Далее дважды:

Установка ролей и компонентов

В окне «Выбор ролей сервера» выбираем Службы удаленных рабочих столов:

Службы удаленных рабочих столов

Кликаем Далее, пока не появится окно «Выбор служб ролей» и выбираем следующие:

  • Лицензирование удаленных рабочих столов
  • Узел сеансов удаленных рабочих столов

Выбор служб ролей

Нажимаем Далее, при появлении запроса на установку дополнительных компонентов соглашаемся.

При необходимости, также выставляем остальные галочки:

  • Веб-доступ к удаленным рабочим столам — возможность выбора терминальных приложений в браузере.
  • Посредник подключений к удаленному рабочему столу — для кластера терминальных серверов посредник контролирует нагрузку каждой ноды и распределяет ее.
  • Узел виртуализации удаленных рабочих столов — для виртуализации приложений и запуска их через терминал.
  • Шлюз удаленных рабочих столов — центральный сервер для проверки подлинности подключения и шифрования трафика. Позволяет настроить RDP внутри HTTPS.

Нажимаем Далее и в следующем окне Установить. Дожидаемся окончания процесса установки и перезагружаем сервер.

Установка служб удаленных рабочих столов

После перезагрузки открываем Диспетчер серверов и нажимаем Управление – Добавить роли и компоненты:

В окне «Выбор типа установки» выбираем Установка служб удаленных рабочих столов и нажимаем Далее:

Установка служб удаленных рабочих столов

В окне «Выбор типа развертывания» выбираем Быстрый запуск и нажимаем Далее:

Быстрый запуск

В «Выбор сценария развертывания» — Развертывание рабочих столов на основе сеансов — Далее:

Развертывание рабочих столов на основе сеансов

Еще раз Далее — при необходимости, ставим галочку «Автоматически перезапускать конечный сервер, если это потребуется» и кликаем по Развернуть.

Настройка лицензирования удаленных рабочих столов

Для корректной работы сервера, необходимо настроить службу лицензирования. Для этого открываем диспетчер серверов и кликаем по Средства – Remote Desktop Services – Диспетчер лицензирования удаленных рабочих столов:

Диспетчер лицензирования удаленных рабочих столов

В открывшемся окне кликаем правой кнопкой мыши по нашему серверу и выбираем Активировать сервер:

В открывшемся окне дважды кликаем Далее – заполняем форму – Далее – Далее – Снимаем галочку «Запустить мастер установки лицензий» – Готово.

Снова открываем диспетчер серверов и переходим в «Службы удаленных рабочих столов»:

В «Обзоре развертывания» кликаем по Задачи – Изменить свойства развертывания:

Изменить свойства развертывания

В открывшемся окне переходим в Лицензирование – Выбираем тип лицензий – прописываем имя сервера лицензирования (в данном случае локальный сервер) и нажимаем Добавить:

Лицензирование

Применяем настройки, нажав OK.

Добавление лицензий

Открываем диспетчер серверов и кликаем по Средства – Remote Desktop Services – Диспетчер лицензирования удаленных рабочих столов:

Диспетчер лицензирования удаленных рабочих столов

В открывшемся окне кликаем правой кнопкой мыши по нашему серверу и выбираем Установить лицензии:

В открывшемся окне нажимаем Далее:

В открывшемся окне нажимаем Далее

Выбираем программу, по которой куплены лицензии, например, Enterprise Agreement:

выбираем программу

Нажимаем Далее – вводим номер соглашения и данные лицензии – выбираем версию продукта, тип лицензии и их количество:

номер соглашения и данные лицензии

Нажимаем Далее – Готово.

Проверить статус лицензирования можно в диспетчере серверов: Средства – Remote Desktop Services – Средство диагностики лицензирования удаленных рабочих столов.

статус лицензирования

Мы также готовы оказать помощь в установке и настройке терминального сервера.

Нашим клиентам мы предлагаем реализацию данного проекта и его последующее обслуживание в рамках ИТ-аутсорсинга.

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Какой войти в безопасный режим windows 10
  • Драйвер для bcm20702a0 bluetooth под windows 10
  • Как сделать свободное расположение ярлыков на рабочем столе windows 10
  • Как обновить драйвер блютуз на windows 10 ноутбук
  • В начале установки windows компьютер зависает