В этой статье мы рассмотрим несколько распространенных ошибок, связанных с RDS лицензированием, когда RDP удаленные клиенты не могут подключится к терминальным серверам Windows Server с ролью Remote Desktop Services Host.
Ошибки лицензирования при подключении RDP клиентов к RDS хосту могут появляться, если:
- На хосте Remote Desktop Services не указан сервер RDS лицензирования, с которого нужно получить клиентские лицензии (RDS CAL);
- На сервере RDS Licensing закончились доступные клиентские лицензии;
- Клиент пытается подключиться с истекшей временной RDS лицензией;
Содержание:
- Удаленный сеанс отключен, поскольку для данного компьютера отсутствуют клиентские лицензии удаленного рабочего стола
- Удаленный сеанс отключен, поскольку отсутствуют доступные серверы лицензирования удаленных рабочих столов, которые могли бы провести лицензирование
- RDS Licensing Grace Period Has Expired (L$RTMTIMEBOMB)
Удаленный сеанс отключен, поскольку для данного компьютера отсутствуют клиентские лицензии удаленного рабочего стола
Сначала рассмотрим ошибку, связанную с получением клиентами лицензий (RDS CAL) с сервера лицензирования.
Remote session was disconnected because there are no Remote Desktop client access licenses available for this computer
Удаленный сеанс отключен, поскольку для данного компьютера отсутствуют клиентские лицензии удаленного рабочего стола
В первую очередь вам нужно подключиться к RDSH серверу в административном режиме (
mstsc.exe /admin
) и запустить утилиту RD Licensing Diagnoser. Если у вас все настроено правильно, вы должны увидеть имя сервера лицензирования RDS, и тип лицензии (Per User/Per Device).
С помощью консоли RD Licensing Manager (
licmgr.exe
) подключитесь к серверу RDS лицензий и проверьте, что в вам доступны свободные лицензии нужного типа (Per User/Per Device). Если свободные лицензии закончились, нужно приобрести новый пакет CAL, дождаться пока кто-нибудь освободит лицензию или отозвать неиспользуемые лицензии прямо из консоли (Revoke License).
В данном примере видно, что RDS CAL есть, и они выдаются пользователям (Issued = 44).
Совет. Если ваш сервер RDSH развернут в рабочей группе (не в домене), то на нем нельзя использовать лицензии RDS CAL Per User. При подключении ваши пользователю всегда будут получать временную лицензию Per Device.
Скорее всего в этом случае клиентский компьютер пытается подключиться к вашему RDSH серверу со временной RDP лицензией с истекшим сроком (если при первом подключении клиента ваш RDS Licensing сервер был недоступен, клиенту была выдана временная лицензия на 180 дней). В этом случае нужно на клиенте сбросить эту просроченную лицензию в реестре.
На клиентском компьютере (в этом примере Windows 10), выполните следующее:
- Запустите редактор реестра
regedit.exe
; - Удалите ветку реестра HKEY_LOCAL_MACHINE\Software\Microsoft\MSLicensing;
- Закройте редактор реестра и запустите mstsc.exe (Remote Desktop Connection) с правами администратора;
- Потом подключитесь к вашему RDS серверу. При этом ветка MSLicensing автоматически пересоздастся, и компьютер получит новую лицензию.
Если вы не запустили
mstsc.exe
с правами администратора, то при любом RDP подключении будет появляться ошибка:
The remote computer disconnected the session because of an error in the licensing protocol. Please try connecting to the remote computer again or contact your server administrator.
Удаленный сеанс отключен, поскольку отсутствуют доступные серверы лицензирования удаленных рабочих столов, которые могли бы провести лицензирование
У одного из заказчиков появилась другая проблема с фермой терминальных серверов Remote Desktop Services на базе. По какой-то причине RDS сервер перестал выдавать терминальные лицензии пользователям, хотя роль сервера лицензий RDS установлена и настроена, а RDP CAL активированы.
Когда пользователь пытается подключится к терминальному серверу по RDP, появляется ошибка:
The remote session was disconnected because there are no Remote Desktop License Servers available to provide a license. Please contact the server administrator.
В русской версии Windows ошибка выглядит так:
Удаленный сеанс отключен, поскольку отсутствуют доступные серверы лицензирования удаленных рабочих столов, которые могли бы провести лицензирование.
Подключитесь к консоли сервера в административном режиме (
mstsc /admin
). Запустите Server Manager, откройте настройки RDS (Remote Desktop Services -> Deployment Overview -> Tasks -> Edit Deployment Properties ) и проверьте что в конфигурации RDSH указан правильный сервер лицензирования (Remote Desktop License Server) и тип RDS CAL (Per Device или Per User).
Также можно проверить настройки сервера RDS лицензирования из PowerShell:
Get-RDLicenseConfiguration
Как мы видите, LicenseServer в конфигурации указан, и используется тип лицензирования PerUser.
Проверьте, что следующие порты не блокируются межсетевыми экранами при доступе с RDSH хоста до RDS LicenseingServer:
TCP:135, UDP:137, UDP:138, TCP:139, TCP:445, TCP:49152–65535 (RPC range)
. Если RDS License сервер не доступен, в окне License Diagnoser будет ошибка:
License server rdslic_hostname is not available. This could be caused by network connectivity problems, the Remote Desktop Licensing service is stopped on the license server, or RD Licensing isn't available.
RDS Licensing Grace Period Has Expired (L$RTMTIMEBOMB)
Внимательно посмотрите события в Event Viewer на RDS хосте. Возможно там есть такая ошибка:
EventID: 1128 Source: TerminalServices-RemoteConnectionManagerThe RD Licensing grace period has expired and the service has not registered with a license server with installed licenses. A RD Licensing server is required for continuous operation. A Remote Desktop Session Host server can operate without a license server for 120 days after initial start up.
В RD License Diagnoser скорее всего также будет отображаться ошибка:
The grace period for the Remote Desktop Session Host server has expired, but the RD Session Host server hasn't been configured with any license servers. Connections to the RD Session Host server will be denied unless a license server is configured for the RD Session Host server.
Это означает, что ваш льготный период работы RDSH сервера (grace) истек, и вам нужно продлить grace режим, либо активировать хост на полноценном сервере лицензий RDS.
Количество дней до окончания RDS Grace Period можно узнать из
cmd.exe
с правами администратора командой:
wmic /namespace:\\root\CIMV2\TerminalServices PATH Win32_TerminalServiceSetting WHERE (__CLASS !="") CALL GetGracePeriodDays
Обратите внимание, что
DaysLeft = 0
. Это означает, что на RDSH хосте истек Grace Period.
Чтобы продлить grace период в RDS нужно на сервере удалить параметр реестра, в котором задается время отсчета льготного периода лицензирования (grace period licensing). Дата, определяющая время окончания работы RDSH в режиме grace хранится в reg_binary параметре реестра L$RTMTIMEBOMB (довольно забавное имя –TIME BOMB …. ;), находящемся в ветке:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\GracePeriod
Вам нужно удалить из реестра параметр L$RTMTIMEBOMB. Однако, у администратора недостаточно прав для этого.
Unable to delete all specified values.
Чтобы удалить этот параметр реестра, нужно открыть разрешения родительской ветки и предоставить своей учетной записи права владельца на ветку. Затем дайте себе права RW на ветку (не буду подробно описывать сам процесс).
Теперь щелкните правой кнопкой по параметру L$RTMTIMEBOMB и удалите его.
Перезагрузите RDSH сервер и подключитесь к нему с клиента по RDP.
С помощь консоли Remote Desktop Licensing Manager проверьте, что RDS CAL лицензия выдана.
Если RDS CAL не получен, проверьте есть ли в журнале событие:
Event ID : 1130 Source : TerminalServices-RemoteConnectionManager The Remote Desktop Session Host server does not have a Remote Desktop license server specified. To specify a license server for the Remote Desktop Session Host server, use the Remote Desktop Session Host Configuration tool.
С помощью следующей PowerShell команды проверьте, задан ли сервер RDS лицензирования:
$obj = gwmi -namespace "Root/CIMV2/TerminalServices" Win32_TerminalServiceSetting
$obj.GetSpecifiedLicenseServerList()
Как вы видите, сервер лицензирования RDS не задан (список
SpecifiedLSList
пуст). Следующая команда принудительно задаст адрес сервера лицензий RDS.
$obj = gwmi -namespace "Root/CIMV2/TerminalServices" Win32_TerminalServiceSetting
$obj.SetSpecifiedLicenseServerList("msk-rdslic.winitpro.ru")
Также можно задать имя сервера лицензирования и тип лицензии с помощью GPO. Если вы используете локальную политику, запустите gpedit.msc и перейдите в раздел Computer Configuration -> Administrative Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Session Host -> Licensing и настройте два параметра:
- Use the specified Remote Desktop license servers
- Set the Remote licensing mode
Теперь RDS хост сможет получать лицензии от сервера RDS Licensing и выдавать их вашим RDP пользователям.
После завершения активации сервера лицензирования, который включен в ОС Microsoft, и установки лицензий выдается льготный период лицензирования продолжительностью 120 дней. По истечении данного срока достаточно заново активировать сервер лицензирования, чтобы сбросить счетчик дней и продолжить использование терминального сервера.
В данной статье мы рассмотрим способ сброса данного льготного периода.
1. Переходим в редактор реестра. Для этого нажимаем сочетание клавиш WIN+R и вводим regedit. В редакторе реестра открываем раздел:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\GracePeriod
2. После этого нажимаем правой кнопкой мыши на раздел GracePeriod и переходим в Разрешения
3. В появившемся окне нажимаем Дополнительно
4. Далее нам потребуется сменить владельца раздела и разрешить ему полный доступ. Для смены владельца нажмите на Изменить в поле Владелец.
5. В качестве владельца раздела установим группу Администраторы. Нажав кнопку Проверить имена можно сделать проверку наличия этой группы — если она существует, то имя группы станет подчеркнутым. Нажимаем ОК для сохранения изменений.
6. Для выхода из дополнительных параметров безопасности еще раз нажимаем ОК, чтобы сохранить внесенные изменения. Затем в окне разрешений выбираем группу Администраторы и ставим галочку для разрешения полного доступа. Также нажимаем ОК и возвращаемся в открытый раздел в редакторе реестра.
7. Теперь в редакторе реестра нам необходимо удалить параметр L$RTMTIMEBOMB_<…>. Для этого нажимаем на него правой кнопкой мыши и выбираем Удалить. Если на предыдущих шагах вы корректно сменили владельца и назначили права, то удаление произойдет без проблем.
8.Закрываем редактор реестра и перезагружаем сервер для применения изменений.
9. Для проверки того, что льготный период сбросился, вы можете воспользоваться командной строкой. Для этого нажмите сочетание клавиш WIN+R, введите cmd, после этого в открывшемся окне выполните команду:
wmic /namespace:\\root\CIMV2\TerminalServices PATH Win32_TerminalServiceSetting WHERE (__CLASS !=»») CALL GetGracePeriodDays
For those who regularly connect to office or site networks through Remote Desktop, remote connectivity problems are nothing new. Some of these problems are simply caused by network glitches, network misconfigurations, or system problems. If you work with Microsoft Windows Server and Remote Desktop Services (RDS), You may encounter the following error message when trying to connect to a Windows Server Remote Desktop Session Host (RDSH) server:
The remote session was disconnected because there are no Remote Desktop License Servers available to provide a license.
Please contact the server administrator.
What is Remote Desktop Services RDS Licensing
When you install Windows Server 2016 or 2019 alongside previous versions of Windows, you get the usual ability to have two sessions that you would normally have available for management. However, when you install the appropriate Remote Desktop Services role, you have the option of having multiple sessions on your server.
By default, when you install the RDS role, you have a 120-day grace period provided by Microsoft to properly license the server you use as your RDS installation. Once the 120-day grace period has expired, you will see The remote session was disconnected because there are no Remote Desktop License Servers available to provide a license. Please contact the server administrator error when you attempt to RDP to the server.
In this case, the client’s computer may try to connect to the RDSH server using an expired temporary RDP license (if the RDS license server was not available when the client first connected, the customer has a temporary RDP license for 120 days. ). In this case, You can either redeploy your Windows server, which will allow you to start a new grace period of 120 days or you must reset this expired license in the registry of RDS Server.
Also Read : –
- How to Fix Error Code 0x80004005 Unspecified in Windows 10/11
- How to fix error 0x00000bc4, No printers were found in Windows 11
If Remote Desktop Licensing Diagnostics reports correct license information and does not find any errors or problems, the problems may be due to an apparent bug in Windows Server where the RDSH server fails to contact the license server after the grace period has expired of the 120 day license. Before starting, a few caveats. Registry editing can completely destroy your Windows system, so be careful with low-level registry editing and make sure to take a registry backup.
Please follow the below steps to reset the RDS Grace Period.
Apply the instructions below, only if you’re using the RDS Server 2012. 2016, 2019 on a testing environment. I will talk about the remote connection problem caused by the RDS license. Remote Desktop licenses are also known as client access licenses (CALS). This license can be purchased from Microsoft and configured on servers with connectivity issues.
- Press the Windows Key then press “R“.
- Type “regedit” in the run box and hit “OK“.
- Navigate to the following location.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\GracePeriod
- Right-click at the ‘GracePeriod’ key and select Permissions.
There is no default permission for this key, not even for administrators. Before you can remove the time constraint value, you must first take ownership of the key. Click the Advanced button in the Permissions dialog box.
Click the Change button next to the Owner.
Here, we have selected the local administrator’s group as the main owner. However, you must select the user/group to use to delete the registry key. Select options to override owners and override all child object permissions.
Confirm the replacement of permissions on the registry key GracePeriod.
Now that we’ve changed the ownership of the key, we can actually set permissions without getting permission errors. Here I give administrators full control over the GracePeriod Key.
Now, with permissions set, right-click the timebomb value in the GracePeriod key and Delete. Or you can Delete GracePeriod Key From the RCM.
Confirm the deletion of the registry entry.
Then all you have to do is restart your server. After restarting the server, you can enjoy the full 120 day grace period of your RDS server in the lab environment again.
Video Overview of the Process
Friends If you have installed an Remote desktop service on you Server 2008/2012/2016 or 2019 and you haven’t purchased license for RDS and your RD Services is running on grace period and now the Remote desktop service licensing grace period has expired, then what to do? how to reset the 120 days grace period.
So in this today’s article I’ll explain you step by step how you can reset or extend your 120 days Remote desktop service (RDS) licensing grace period.
So, As you all know when you install the Remote desktop service (RDS) on your Server 2008/2012/2016 or 2019 then you have 120 days to install the RD client access licenses, otherwise users will no longer be able to establish Remote desktop service (RDP) sessions on the Remote Desktop server, with error “The remote desktop session was disconnected because there are no Remote Desktop License servers available to provide a license”.
Also Check This :- Windows Server 2016 Activation script or Txt file
How To Reset or Extend Remote Desktop Services 120 Days Grace Period
- So, First of all you have to open Registry Editor on your server, to open the Registry editor Press W + R and then type Regedit.exe
- Then Click on HKEY_LOCAL_MACHINE —> SYSTEM —> CurrentControlSet —> Control —> Terminal Server —> RCM —> Grace Period
- Now Right click on the Grace Period option and select Permissions option.
- Then click Advanced option.
- Now Select the Administrators option and click on Edit Button.
- And Change the permissions to Full Control and click OK —> OK —> OK .
- Then Right click on L$RTMTIMEBOMB… value and Delete it.
- Then Close the Registry Editor and restart your Server.
Also Check This :- How to Configure Outlook with IMAP or Pop
Now after restarting the server, you have once again got a grace period of 120 days. Or we can say that we have extended our grace period or we have reset our grace period to use RDS for free without purchasing a license. But I suggest you to Purchase RDS License, Because Extending or Resetting the Grace period is temporary solution.
If you Face any Trouble while Extending or Resetting your 120 Days Grace Period then Simply Comment Below We will definitely help you.
Tags: extend remote desktop service grace period, how to access RDP Server, how to extend RDP Grace period, how to extend RDS Grace Period, how to reset RDP grace period, how to reset RDS 120 days Grace period, how to reset RDS grace period, RDP Server not accessible, RDS server 120 days Grace period extend, RDS Server grace period, remote desktop connection issue, remote desktop grace period, Remote Desktop License servers not available, remote desktop licensing mode not configured, remote desktop server license issue, remote desktop session, Reset Remote Desktop grace period, reset remote desktop service grace period
When you home lab and you don’t have Microsoft license for RDS, you have two options. Reinstall the server (redeploy the VM) or cheat a bit. Yes, in fact, there is cool hack which allows you to reset the 120 day grace period on Windows Server 2012 R2 RDS, and we’ll show you how. I like doing posts which shows some cool hacks, and this is exactly this kind of post – How To Reset 120 Day RDS Grace Period on 2012 R2 Server.
Normally you would need to activate the RDS/TS CAL License server and point the Server to License server with User/Device License and will resolve the problem. However, we don’t want to do that because we have no license from Microsoft, in our lab. (and many other IT pros who test stuff in the lab too).
What we will do is simply reset the default timer which is 120 days grace time, when you first add the RDS role. In fact, you do not need to reboot the server either. Simply log out and back in and the message changes from let’s say 54 days left to 120 days left. And that’s it.
Note: This tip works also on Windows Server 2016
For every admin who runs homelab or has a cloud lab, this is a must known hack.
Obviously, you won’t do this in a production environment, because your production environment is covered with a proper license. Right? Ok, this is clearly for labs, tests, cloud tests etc…
How To Reset 120 Day Grace Period on 2012 R2 Server RDS – The Steps
Step 1: Connect to your RDS Server as an admin and open regedit.
Navigate to the following key:
The solution is to delete the REG_BINARY in:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\GracePeriod
It’s called a “TimeBomb” … -:)
Note: You must first take an ownership and give admins the full rights.
Like this:
Go to menu Edit > Permissions
Once you delete the Registry key you must reboot the host. Some users have reported that when not rebooting the host you will see the message changing, but no connections are possible.
Update: Well, in fact, you can just restart the Service “Remote Desktop Services” which will momentarily disconnect all the active sessions and then after a minute or so you can reconnect to the sessions.
You should see the message changing at the taskbar area….
Note that you have also a possibility to check how many days its left… Go to the command prompt and enter this command (not tested).
wmic /namespace:\\root\CIMV2\TerminalServices PATH Win32_TerminalServiceSetting WHERE (__CLASS !=””) CALL GetGracePeriodDays
Apparently, you can delete this key every time it expires ….. indefinitely. Wow. That’s good to know too.
This is it my friends. Today’s tip for home labs.
Second Tip:
Update: The Microsoft’s script was taken down. I have been contacted by someone (look at the comments section) who has published an alternative. Get it here.
Download a PowerShell script from Microsoft allowing you to reset the RDS grace period.
Quote from Microsoft Technet:
The PowerShell script can be used to query and reset terminal server grace period to default 120 days if it is nearing to the end. We often need to deploy Terminal Server (Remote Desktop Session Host in 2012) for testing purposes in development environments allowing more than 2 concurrent Remote Desktop Sessions on it. When it is installed, by default if no RDS or TS Licensing server is specified via either GPO or Registry, it is in default Grace period which is 120 days and it works fine until then.
Once Grace period expires, the server does not allow even a single Remote Desktop session via RDP and all we are left with is to logon to the Console of machine using Physical/Virtual console depending on Physical or Virtual machines or try to get in using mstsc /admin or mstsc /console, then remove the role completely and restart the terminal server (RDS Server) and post that it starts accepting default two RDP sessions.
In the comment section, there was a user who affirmed that he verified it on Windows Server 2016 as well and it works just fine. With that, stay tuned for more.
More from ESX Virtualization:
- Windows Server 2019 Announced
- What is Veeam Availability Orchestrator?
- V2V Migration with VMware – 5 Top Tips
- VMware vCSA 6.7 Appliance Backup Setup and Schedule
- Windows Admin Center Update – New Features in latest build
- Free Up Disk Space On Windows 10 – The New Way
Subscribe to RSS, and social media channels (Twitter, FB, YouTube)