Сброс триала удаленного рабочего стола windows server 2016

Описанный ниже способ является нарушением лицензионного соглашения ...


Windows Server

  • 01.01.2021
  • 37 254
  • 0
  • 43
  • 43
  • 0

Сброс тестового периода для терминального сервера Windows

  • Содержание статьи
    • Описание проблемы
    • Сброс пробного периода
    • Добавить комментарий

Описание проблемы

Описанный ниже способ является нарушением лицензионного соглашения! Используйте его на свой страх и риск!

Основанные на Windows терминальные сервера (сервера удаленных рабочих столов, и т. д.) требуют приобретения дополнительных лицензий, в противном случае терминальный сервер будет работать с пробном режиме — без каких-либо ограничений по функционалу, но только первые 180 дней. После того, как пройдут 180 дней, подключится к такому серверу пользователям не получится, поскольку он будет ругаться на отсутствие лицензий.

Сброс пробного периода

Поскольку при подключении удаленно к такому серверу будет появлятся ошибка об отсутствии лицензий на подключения к серверу, подключаться к нему будет возможно только через консольный сеанс — для этого, необходимо выполнить команду mstsc /admin.

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

HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlTerminal ServerRCMGracePeriod

В данном разделе реестра необходимо удалить значение реестра с названием начинающимся на L$RTMTIMEBOMB..., однако, скорее всего ничего не выйдет, поскольку по умолчанию у пользователей компьютера нет прав на внесение изменений в данном разделе. Для исправления данного недоразумения, необходимо открыть разрешения данного раздела, и сменить его владельца на Администраторы.

Делается это следующим образом:

  1. На нужном разделе реестра нужно нажать правой кнопкой мыши, и в появившемся меню выбрать пункт «Разрешения».
  2. Откроется список разрешений. В нем нужно нажать на кнопку «Дополнительно».
  3. Откроются дополнительные параметры, где в самом верху будет написан владелец, а рядом будет кнопка «Изменить». Нажимаем на неё.
  4. Откроется окошко, где нужно будет ввести имя группы администраторов — например «Administrators». Для корректировки названия в понятный системе формат следует нажать на кнопку «Проверить имена».

    Если все будет правильно, система подчеркнет название группы, после чего остается только выйти из всех ранее открытых окон, нажимая кнопки «ОК» (для применения новых разрешений).

После этого, остается только удалить значение реестра с названием L$RTMTIMEBOMB..., после чего перезагрузить сервер. Если все было сделано правильно, то пробный период будет активирован по новой, и пользователи смогут работать на данном сервере как раньше.

StarWind VSAN

If you have a home lab environment or other lab that you continually test various solutions, licensing and trial expiration is a challenge that you constantly tend to run into. It is just part of the fun of lab environments. While most trials are fairly “hard and fast” and don’t allow you to reset the trial expiration, if you work with Microsoft Windows Server and Remote Desktop Services (RDS), there is a “hack” that allows you to effectively reset the expiration of Remote Desktop Services grace period where you can essentially rewind the clock on your RDS licensing if you are making use of this role inside your lab environment. In my lab environment, I am making use of Windows Server 2019 for my Windows workloads. In this post, I will show how to reset 120 day RDS Grace period on 2016 and 2019 Windows Server. Let’s see.

Remote Desktop Services RDS Licensing

When you install Windows Server 2016 or 2019 as with previous Windows versions, you get the normal ability to have the two sessions that you generally have available for administering. However, when you install the true Remote Desktop Services role, you have the ability to have multiple sessions to your server.

When you install the role, by default, you have a 120-day grace period that Microsoft gives you to properly license the server for use as an RDS installation. If you are using a server in a lab environment, most likely, you are not going to license this type of server outside of production.

Once the 120 day grace period has expired, you will see the following error when you attempt to RDP to the server:

Cameyo Virtual App Delivery

Error-after-120-day-grace-period-has-expired-for-Remote-Desktop-Services
Error after 120 day grace period has expired for Remote Desktop Services

You can either redeploy your Windows Server which will allow you to spin up a new 120 day grace period, or you can actually reset the grace period. If you are like me, the latter is certainly the path of least resistance and work involved. Let’s take a look at how to reset the 120 day RDS grace period.

You can take a closer look at the official licensing documentation for Remote Desktop Services here:

  • https://docs.microsoft.com/en-us/windows-server/remote/remote-desktop-services/rds-client-access-license

For the exercise of resetting the 120 day grace period for the RDS role, the registry editor is your friend and makes this process easy. Before we begin, there are a couple of disclaimers to make here. Editing the registry can result in totally destroying a Windows system, so proceed with any low-level registry edits with caution. If you are working with a virtual machine, it is always a good practice to create a quick snapshot of the Windows virtual machine before you begin.

Additionally, for production systems, resetting the 120 day grace period should only be done for systems that are not in production as you should have proper licensing installed for production use.

To reset the grace period, there are actually just 3 steps involved:

  1. Change permissions on the RCM > GracePeriod key
  2. Delete the “Timebomb” registry entry
  3. Reboot the server

Now that we have level-set, once you have your snapshot or other backup created, you need to navigate to the following location on your RDS server:

ComputerHKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlTerminal ServerRCMGracePeriod

Change Permissions on the RDS GracePeriod key and delete the key

After you have navigated to the key documented above, right-click GracePeriod and select Permissions.

Navigate-to-the-RDS-GracePeriod-key
Navigate to the RDS GracePeriod key

For obvious reasons, there are no default permissions on this key for even Administrators. So you have to first take ownership of the key before you can delete the timebomb value. Click the Advanced button on the permissions dialog box.

Navigate-to-the-Advanced-permissions-properties
Navigate to the Advanced permissions properties

Click the Change button next to the Owner.

Change-the-ownership-of-the-registry-key
Change the ownership of the registry key

Here I have selected local administrators group as the owner of the key. However, you will want to choose whichever user/group that you want to use to delete the registry key. Select the options to replace owners and replace all child object permissions.

User-for-ownership-selected-and-set-to-replace-permissions-on-child-objects
User for ownership selected and set to replace permissions on child objects

Confirm the replacement of permissions on the registry key.

Confirm-replacing-permissions
Confirm replacing permissions

Now that we have changed ownership on the key, we can actually set permissions without getting permissions errors. Here I am granting administrators full control on the key.

Change-permissions-for-the-user-you-want-to-be-able-to-delete-the-key
Change permissions for the user you want to be able to delete the key

Now, with permissions set, right-click the timebomb value in the GracePeriod key and Delete.

Delete-the-timebomb-key
Delete the timebomb key

Confirm the deletion of the registry entry.

Confirm-deletion-of-the-timebomb-key-in-the-registry
Confirm deletion of the timebomb key in the registry

Next, the only thing left to do is reboot your server. Once the server is rebooted, you can enjoy once again having the full 120 day grace period for your RDS server in the lab environment.

Video Overview of the Process

If you want to take a look at a video of the process, you can watch the video walkthrough below.

https://www.youtube.com/watch?v=zQ_GrVAfK6Q

Video walkthrough of resetting the 120-day RDS grace period

Concluding Thoughts

The process to reset 120 day RDS Grace period on 2016 and 2019 Windows Servers as well as older server versions such as Windows Server 2012 and 2012 R2 is very straightforward using this process to delete the timebomb registry key.

Keep in mind this is not supported and certainly not a process for running in production. However, it is very handy for lab environments to keep from having to redeploy Windows Server virtual machines simply to have a fresh 120 day grace period.

Версия для оценки Windows Server 2016 Evaluation Edition доступна для скачивания с официального сайта Microsoft. Версия имеет полный функционал и нормально работает в течении триального периода (180 дней).Беда заключается в том, что по истечении триального периода сервер пишет в логи: 

Процесс C:Windowssystem32wlmswlms.exe (<имя>) инициировал действие «Завершить работу» для компьютера <имя> от имени пользователя NT AUTHORITYСИСТЕМА по причине: Другое (Запланированное)
Код причины: 0x80000000
Тип выключения: Завершить работу
Комментарий: Истек срок действия лицензии для этой установки Windows. Компьютер завершает работу.

и выключается.

Такая ситуация имеет два варианта решения: Вариант 1 (не правильный) — сбросить триальный период. Вариант 2 (правильный) — обновить до нормальной версии и активировать через KMS-сервер или с помощью  MAK/Retail ключа.

Вариант 1. Сброс триала.

Запускаем Powershell и вводим команду:

slmgr -rearm

Дожидаемся сообщения «Command completed successfully» и перезагружаем сервер.

Вариант 2. Upgrade до Standard/Datacenter.

Проверяем что стоит Evaluation Edition.

DISM /online /Get-CurrentEdition

Должно быть: Current Edition ServerStandardEval.

Смотрим список доступных версий

DISM /online /Get-TargetEditions

Выбираем нужную версию и выполняем апгдейд с помощью общедоступного KMS-ключа.

Для версии Standard:

dism /online /set-edition:ServerStandard /productkey:WC2BQ-8NRM3-FDDYY-2BFGV-KHKQY /accepteula

Для версии Datacenter:

DISM /online /Set-Edition:ServerDatacenter /ProductKey:CB7KF-BWN84-R7R2Y-793K2-8XDDG /AcceptEula

Перезагружаем сервер.

Далее можно активировать операционку через KMS-сервер либо MAK/Retail ключом.

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:

Server 2012 RDS Reset 120 Day Grace Period

The solution is to delete the REG_BINARY in:

HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlTerminal ServerRCMGracePeriod

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

Server 2012 RDS Reset 120 Day Grace Period

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:\rootCIMV2TerminalServices 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)

Introduction

Sometimes, guys running home labs do not have licenses for Remote Desktop Services (RDS). Well, that’s not a big deal, you know, because Microsoft provides the 120-day grace period for the platform! However, one day the time runs out and RDS server breaks all the client connections. That day, admins are to choose between reinstalling the server and cheating a bit to reset the 120-day RDS grace period.

Well, guys who run testing environments and home labs sometimes choose the second option. At this point, I’d like to say that I neither support nor promote illegal use of Microsoft’s software for commercial purposes with this article! You know, Microsoft themselves provide the script to restore the grace period: https://gallery.technet.microsoft.com/scriptcenter/Reset-Terminal-Server-RDS-44922d91 . Well, I did not try that script myself, but I believe it should work.

There are some ways to reset the grace period through GUI. You can google a bit and find many of them! But, in this article, I teach you how to reset the grace period with PowerShell and Command Prompt. As I did not find a ready-to-go solution, everything I write here is something I came up with based on my own experience with a tiny portion of googling, of course 😊. Note that the method I describe here is pretty risky as you will acquire system level privileges. In other words, you may mess things up fairly easy. On the other hand, you can reset the grace period faster than through GUI! Anyway, I warned you about the risk, so do not play around with the registry a lot! And, not blame me if something goes wrong.

Tools

For this article, I use a physical server with Windows Server 2016 SE v10.0.14393 and RDS enabled. A virtual server works well too, but I use here the physical one. I use Evaluation OS edition for this article. And, as any guy with an Evaluation edition, I do care today about the grace period!

As for RDS platform, I believe you already know what that thing is and how to use it. So, I won’t talk about it here. The trick I describe in this article works good for Windows Server 2016, 2012 R2, and even 2008 R2.

For resetting the period, you need the PsExec utility. PsExec is Windows Sysinternals package component that provides you with system level privileges. Why do you need that thing? You see, Windows Server does not have the native means to reset the Period. This means that admin’s privileges won’t be enough to reset the grace period. Here, PsExec comes into the play calling a PowerShell instance that has the system level privileges. Download the utility here: https://docs.microsoft.com/en-us/sysinternals/downloads/psexec. Afterward, extract it somewhere. In my case, the utility is kept in C:PSTools.

Resetting RDS grace period

How many time RDS has?

Open Command Prompt first and navigate to the PsExec folder. Run the following cmdlets to ensure that the utility is in the folder and is ready to start:

Note that there are both 32-bit (PsExec) and 64-bit (PsExec64) PsExec versions in the folder. I use the 32-bit one in this article.

As I said above, you don’t need to re-install the OS to reset the grace period. You just need to find in the registry the “timebomb” – the parameter that contains the piece of code for the countdown. Once that countdown variable value hits 0, RDS server stops serving the client connections. If you want to check how many days you still can use RDS, deploy this command:

wmic /namespace:rootCIMV2TerminalServices PATH Win32_TerminalServiceSetting WHERE (__CLASS !=””) CALL GetGracePeriodDays

In my case, this command worked out only for Windows Server 2016. For Windows Server 2012 R2 and Windows Server 2008 R2, I wasn’t able to find the cmdlet allowing you to do the same thing.

Let’s defuse the “timebomb”!

Start the PowerShell instance through PsExec with the command below. Look, Windows does not have the native tools to acquire the system level privileges. And, you won’t be able to play around with registry having administrator’s privileges. Here, PsExec comes into the play providing you with the system level privileges!

c:pstoolsPsexec s i PowerShell

If you start the utility for the first time, you need to accept the license agreement. Once you press Agree, another PowerShell window emerges. I do everything I describe below in that window.

Run the following cmdlet to get the grace period parameter value in the registry:

GetItem Path Registry::HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlTerminal‘ ‘ServerRCMGracePeriod

There’s a small thing that I’d like you to know about the syntax. For all the commands listed below in this article, do not forget to write all the spaces in directory names between the single quotes. For example, look carefully one more time at how I wrote the Terminal Server directory name in the cmdlet above. See, that’s what I’m talking about! Without those single quotes, you’ll face an error.

Now, let’s look through the Get-Item output. See, the GracePeriod variable exists.

Let’s look at how you get rid of it. As the current PowerShell instance has the system level privileges, you can delete the variable from the registry fairly easy. Use the following command for removing the variable:

RemoveItemProperty Path Registry::HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlTerminal‘ ‘ServerRCMGracePeriod Name L$RTMTIMEBOMB_*

Look at the cmdlet above one more time. See that * at the end of the line? I use it as the grace period variable name depends on the OS. That symbol helps to refer to the variable by the right name. Sure, you can deploy the Get-Item command to acquire the real name, but if you are as lazy as me, just use * 😊. The last but not the least, remember about single quotes in the Terminal Server directory name!

Make sure that you reset the grace period

Congratulations, once the Remove-ItemProperty cmdlet is deployed, the grace period is reset!

GetItem Path Registry::HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlTerminal‘ ‘ServerRCMGracePeriod

RestartComputer Force

Now, that’s time to reboot the server. You can use this cmdlet:

See, there are no variables in the GracePeriod registry branch.

Once you reboot the server, the L$RTMTIMEBOMB_* variable is created again. Now, let’s check whether the grace period has been reset. Do that just in the same way you did it at the beginning:

wmic /namespace:rootCIMV2TerminalServices PATH Win32_TerminalServiceSetting WHERE (__CLASS !=””) CALL GetGracePeriodDays

See, there RDS has 120 days left again!

Conclusion

Today, I described how to reset the RDS grace period. The nice thing is that you do not need GUI to have the job done! Everything I did in this article works fine for not only Windows Server 2016 but also old Windows Server 2012 R2 and Windows Server 2008 R2. The wmic cmdlet works only for Windows Server 2016, but that’s not the thing one should really worry about. Again, the workaround described here should be used only in the test and home-lab environments. Never use it for production environments! I believe that you have them covered with a proper license, don’t you?

  • Remove From My Forums
  • Вопрос

  • Добрый день. Для нашего пилотного проекта мы установили Windows Server 2016 Standart Evaluation активировав систему на 180
    дней, далее установили дополнительный необходимый софт и передали виртуальную машину(vmware) в отдел тестирования, после установки у себя виртуальной машины(физическое железо различается), отдел тестирования прислал скрин с ограничением
    периода использования до 7 дней. Помогите вернуть период использования сервера(пробный период), купить лицензию сможем только после результатов тестирования. Возможно подскажите, какие-нибудь способы сменой ключа для версии Evaluetion?
    Звонил в тех.поддержку Microsoft — послали сюда.

    • Изменен тип

      4 июня 2018 г. 14:26
      Вопрос

    • Перемещено
      MSBuy.ru
      6 июня 2018 г. 8:55
      (технический вопрос по установке и настройке пробной версии продукта)

Ответы

  • BadRus если
    Ваша цель — восстановить правильный счётчик срока периода в 180 дней (срок обозначен в лиц. соглашении), то Вы можете воспользоваться скриптом
    slmgr.vbs (справка по скрипту: slmgr.vbs /?).

    И какой же именно параметр позволяет «восстановить
    правильный счетчик» (с учетом использованных ранее дней)? Лично я такой возможности не нашел. Подскажите, пожалуйста.

    Читайте внимательно справку. Там всё написано, а именно про «сброс статуса лицензии».
    И как писал Автор:

    отдел тестирования прислал скрин с ограничением периода использования до
    7 дней.

    данный скрипт позволяет (ст. 1280 ГК РФ) сбросить неправильный статус лицензии (7 дней) на
    правильный (180 дней, как указанно в лицензионном соглашении).

    (с учетом использованных ранее дней)?

    я с Вами полностью согласен, что нужно учитывать ранее использованные дни, по этому BadRus Вам
    нужно самостоятельно следить за тем, чтобы общих срок оценеки ПО не превысил
    законные 180 дней.

    На этом предлагаю закрыть тему.

    • Помечено в качестве ответа
      Vector BCOModerator
      10 июня 2018 г. 23:44

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

    для решения проблемы при импорте вм нужно выбирать пункт move в таком случае активация должна сохраниться


    The opinion expressed by me is not an official position of Microsoft

    • Предложено в качестве ответа
      Vector BCOModerator
      10 июня 2018 г. 23:45
    • Помечено в качестве ответа
      Vector BCOModerator
      10 июня 2018 г. 23:45

Если закончился льготный период работы сервера удаленных рабочих столов, при подключении к нему возникнет ошибка: «Удаленный сеанс отключен, поскольку отсутствуют доступные серверы лицензирования удаленных рабочих столов…»

В этом случае, если проблему требуется решить удаленно, нужно подключиться к консольной сессии на сервере. Лицензии удаленных рабочих столов для этого не требуется. Локально работающий пользователь, при этом будет отключен от сеанса. Чтобы это сделать, нужно запустить RDP клиент в административном режиме: mstsc /admin.


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

wmic /namespace:\rootCIMV2TerminalServices PATH Win32_TerminalServiceSetting WHERE (__CLASS !="") CALL GetGracePeriodDays

Чтобы сбросить счетчик и получить еще 120 дней работы, нужно удалить параметр реестра L$RTMTIMEBOMB в ветке:

HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlTerminal ServerRCMGracePeriod

По умолчанию, у администратора нет прав на редактирование этой ветки, поэтому, сначала нужно стать ее владельцем и установить права доступа.

Далее, жмем во всех окнах ОК/Применить и устанавливаем полные права доступа.

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

Обновлено 20.09.2020

rds logo

Добрый день! Уважаемые читатели и гости одного из крупнейших IT блогов России Pyatilistnik.org. В прошлый раз мы с вами научились отключать software reporter tool в Chrome Браузере, так как этот компонент уж очень сильно мог загружать центральный процессор вашего компьютера или ноутбука. В сегодняшней публикации я хочу поговорить про ошибки лицензирования терминальных столов и RDSH узлов в RDS ферме с которыми может встретиться любой системный администратор в своей практике. Мы рассмотрим ошибку «Этому серверу узла сеансов удаленных рабочих столов недоступны лицензии«.

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

Ситуация такая, ранее я развернул новую терминальную ферму Remote Desktop Services High Availability на базе Windows Server 2019 с определенным количеством RDSH хостов. Решил через месяц добавить еще несколько сервер подключений и после ввода их в состав RDS фермы и подключившись на каждый из них я увидел ошибку получения лицензий в виде формулировки:

Не указан сервер лицензирования удаленных рабочих столов. Службы удаленных рабочих столов прекратят работать через 91 день, если не будет указан сервер лицензирования. На сервере посредника подключений

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

Самое интересное, что у меня при разворачивании RDS фермы был добавлен сервер лицензирования, который мы специально устанавливали под Windows Server 2019. Давайте разбираться в чем дело.

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

Если у вас проблема с лицензированием RDSH хостов, то первым делом вы должны проверить ваши настройки RDS фермы через оснастку управления. В списке «Deployment Server» убедитесь, что у вас добавлены нужные сервера лицензирования RDS и нет лишних. В моем примере было добавлено три сервера лицензирования Remote Desktop Services. Один из них был точно с нужными лицензиями, а вот остальные были под вопросом.

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

Зайдите на каждый из серверов, который предоставляет лицензии и проверьте, что для нужной операционной системы у вас есть лицензии. Делается это через оснастку «Средство диагностики и лицензирования удаленных рабочих столов (RD License Manager)«. Как оказалось на одном из серверов вообще не было лицензий на Windows Server 2019, а на втором их было 0. Исходя из этого, данные сервера нужно удалить из RDS развертывания.

Средство диагностики и лицензирования удаленных рабочих столов (RD License Manager)

Для удаления выбираем «Задачи (Tasks) — Remove RD Licensing Servers«.

Удаление лишних серверов лицензирования из RDS

Выделяем нужные сервера и переносим их в правую область, я специально не стал удалять саму роль лицензирования (Uninstall the RD Licensing role service from the selected server), так как они раздавали лицензии для других версий Windows.

Удаление лишних серверов лицензирования из Remote Desktop Services

Если тут все привели в порядок, то следующим шагом вам необходимо подключиться к нужному участнику RDS фермы, где есть проблемы с получением лицензий и так же проверить, что выдает вам оснастка «Средство диагностики и лицензирования удаленных рабочих столов (RD License Manager)«. Тут вы можете встретить несколько разновидностей ошибок:

Этому серверу узла сеансов удаленных рабочих столов недоступны лицензии, и средство диагностики лицензирования удаленных рабочих столов обнаружило проблемы с лицензированием на этом сервере.

Льготный период использования сервера узла сеансов удаленных рабочих столов еще не истек, но этот сервер не настроен на использование хотя бы одного сервера лицензирования. В английской редакции будет вот такая формулировка «Licensing mode for the Remote Desktop Session Host is not configured. Remote Desktop Service will stop working in 100 days. Remote Desktop Services will stop working because this computer is past grace period and has not contacted at least a valid Windows Server 2019 license server. Click this message to open RD Session Host Server Configuration to use Licensing Diagnosis.»

В данном примере не видно ни одного сервера раздающего лицензии.

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

Этому серверу узла сеансов удаленных рабочих столов недоступны лицензии, и средство диагностики лицензирования удаленных рабочих столов обнаружило проблемы с лицензированием на этом сервере.

Сервер узла сеансов удаленных рабочих столов находится в режиме лицензирования для пользователя и режиме перенаправителя Нет, но на сервере лицензирования не установлено лицензий со следующими атрибутами «Версия продукта Windows Server 1016 — 2019»

В данном примере на добавленных серверах лицензирования RDS просто нет лицензий для нужной редакции. Данные сервера нужно удалить и добавить актуальные.

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

Удалить текущие, неправильные сервера лицензирования вы можете через реестр, но нужно понять как они прилетают на сервер и как были добавлены, если в ручную, то это одно дело, если через групповые политики, то другое. Для начала я вам советую выяснить какие политики применяются к данному серверу, посмотрите как это делается. В моем случае и в правду была общая политика на данной OU, где задавались два неправильных сервера лицензирования.

Напоминаю, что это делается при редактировании GPO политики в ветке

Конфигурация компьютераАдминистративные шаблоныКомпоненты WindowsСлужбы удаленных рабочих столовУзел сеансов удаленных рабочих столовЛицензирование — Использовать указанные серверы лицензирования удаленных рабочих столов (добавляем имя нашего сервера) (Computer ConfigurationAdministrative TemplatesWindows ComponentsRemote Desktop ServicesRemote Desktop Session HostLicensing — Use the specified Remote Desktop license servers )

Та же ветка будет участвовать в настройке локальных политик, если это необходимо, вызвать их можно через окно выполнить, введя там gpedit.msc.

Перечисление серверов лицензирования RDS в локальной политике

Так же задайте тут сразу режим лицензирования для всей RDS фермы, через настройку:

Конфигурация компьютераАдминистративные шаблоныКомпоненты WindowsСлужбы удаленных рабочих столовУзел сеансов удаленных рабочих столовЛицензирование — Задать режим лицензирования удаленных рабочих столов (выбираем тип лицензий)(Computer ConfigurationAdministrative TemplatesWindows ComponentsRemote Desktop ServicesRemote Desktop Session HostLicensing — Set the Remote licensing mode)

Задание режима лицензирования RDS

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

Проверяем появление лицензий для RDSH

Удаление старых серверов лицензирования через реестр

Может получиться ситуация, что у вас сервера лицензирования были добавлены не через политику, как того требует инфраструктура Active Directory, а через реестр, либо может быть ситуация, что в реестре остались мусорные записи, которые политикой не получается перезаписать. В таких ситуациях вам необходимо самостоятельно проверить вот эту ветку реестра. Запустите окно выполнить и введите в нем regedit, чтобы открыть редактор реестра.

HKEY_LOCAL_MACHINESOFTWAREPoliciesMicrosoftWindows NTTerminal Services

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

Проверка сервера лицензирования RDS через реестр Windows

Еще можете проверить вот такую ветку реестра:

HKEY_LOCAL_MACHINESOFTWAREWOW6432NodePoliciesMicrosoftWindows NTTerminal Services

Тут то же может быть ключ LicenseServers.

Проверка сервера лицензирования RDS через реестр Windows

Если необходимо задать режим лицензирования на устройства или пользователя с помощью реестра, то вы это легко сможете сделать в ветке:

HKLMSYSTEMCurrentControlSetControlTerminal ServerRCMLicensing Core

Тут будет ключ реестра LicensingMode, который может содержать три значения:

  • 2 — Задает режим лицензирования на устройство
  • 4 — Задает режим лицензирования на пользователя
  • 5 — Режим лицензирования не настроен

Подробнее на https://docs.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/microsoft-windows-terminalservices-remoteconnectionmanager-licensingmode

Выбор режима лицензирования через реестр

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

Так же вы можете управлять и просматривать значения настроек сервера лицензирования RDS через оболочку PowerShell, для этого вы можете воспользоваться вот такими командлетами.

  • Проверка настроен ли сервер лицензирования

$obj = gwmi -namespace «Root/CIMV2/TerminalServices» Win32_TerminalServiceSetting
$obj.GetSpecifiedLicenseServerList()

Проверка сервера лицензирования через PowerShell

  • Задать нужный сервер лицензий через PowerShell

$obj = gwmi -namespace «Root/CIMV2/TerminalServices» Win32_TerminalServiceSetting
$obj.SetSpecifiedLicenseServerList(«FQDN вашего сервера лицензий»)

В процессе выполнения вы можете получить ошибку:

Исключение при вызове «SetSpecifiedLicenseServerList» : «Недопустимая операция » (“Exception … Invalid operation” или $obj.setspecifiedlicenseserverlist invalid operation)

С большой вероятностью у вас уже задана настройка через групповую политику, поэтому идет такой конфликт. Тут либо отключать политику через gpedit.msc или менять значение в самой политике. Речь идет о данной ветке «Конфигурация компьютераАдминистративные шаблоныКомпоненты WindowsСлужбы удаленных рабочих столовУзел сеансов удаленных рабочих столовЛицензирование — Использовать указанные серверы лицензирования удаленных рабочих столов (Administrative TemplatesWindows ComponentsRemote Desktop ServicesRemote Desktop Session HostLicensing)«

Так же убедитесь, что вы выполняете команду в режиме администратора и имея административные права на данном сервере.

$obj.setspecifiedlicenseserverlist invalid operation

  • Проверка режима лицензирования через PowerShell

$obj = gwmi -namespace «Root/CIMV2/TerminalServices» Win32_TerminalServiceSetting
$obj.LicensingType
$obj.LicensingName

Смена режима лицензирования через PowerShell

  • Смена режима лицензирования через PowerShell

$obj = gwmi -namespace «Root/CIMV2/TerminalServices» Win32_TerminalServiceSetting
$obj.ChangeMode(value)
PS: Value = 2(Per Device)/4(Per User)

На этом я думаю у меня все, вы теперь точно научились диагностировать и решать проблемы с получением и назначением лицензий на сервера RDSH. Вы сами в праве выбирать тот метод, что вам подходит более всего, но старайтесь все же использовать по возможности централизацию в виде групповых политик, это уберет проблему с массовыми настройками и даст инструмент быстрого обновления настроек. С вами был Иван Семин, автор и создатель IT портала Pyatilistnik.org. Жду ваших вопросов и комментариев.

Понравилась статья? Поделить с друзьями:
  • Сброс пароля админа windows 10 через флешку
  • Свернулись все окна на рабочем столе windows 10
  • Сброс пк до заводских настроек windows 10 без переустановки системы
  • Сброс пароля windows с помощью загрузочной usb флешки
  • Свен шрайбер недокументированные возможности windows 2000 скачать