Windows Server
- 01.01.2021
- 50 191
- 3
- 57
- 57
- 0
- Содержание статьи
- Описание проблемы
- Сброс пробного периода
- Комментарии к статье ( 3 шт )
- Добавить комментарий
Описание проблемы
Описанный ниже способ является нарушением лицензионного соглашения! Используйте его на свой страх и риск!
Основанные на Windows терминальные сервера (сервера удаленных рабочих столов, и т. д.) требуют приобретения дополнительных лицензий, в противном случае терминальный сервер будет работать с пробном режиме — без каких-либо ограничений по функционалу, но только первые 180 дней. После того, как пройдут 180 дней, подключится к такому серверу пользователям не получится, поскольку он будет ругаться на отсутствие лицензий.
Сброс пробного периода
Поскольку при подключении удаленно к такому серверу будет появлятся ошибка об отсутствии лицензий на подключения к серверу, подключаться к нему будет возможно только через консольный сеанс — для этого, необходимо выполнить команду mstsc /admin
.
Однако, можно без проблем сбросить пробный период терминального сервера, достаточно выполнить несколько манипуляций в реестре Windows. Для этого, запускаем редактор реестра, и переходим в следующий раздел реестра:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\GracePeriod
В данном разделе реестра необходимо удалить значение реестра с названием начинающимся на L$RTMTIMEBOMB...
, однако, скорее всего ничего не выйдет, поскольку по умолчанию у пользователей компьютера нет прав на внесение изменений в данном разделе. Для исправления данного недоразумения, необходимо открыть разрешения данного раздела, и сменить его владельца на Администраторы.
Делается это следующим образом:
- На нужном разделе реестра нужно нажать правой кнопкой мыши, и в появившемся меню выбрать пункт «Разрешения».
- Откроется список разрешений. В нем нужно нажать на кнопку «Дополнительно».
- Откроются дополнительные параметры, где в самом верху будет написан владелец, а рядом будет кнопка «Изменить». Нажимаем на неё.
- Откроется окошко, где нужно будет ввести имя группы администраторов — например «Administrators». Для корректировки названия в понятный системе формат следует нажать на кнопку «Проверить имена».
Если все будет правильно, система подчеркнет название группы, после чего остается только выйти из всех ранее открытых окон, нажимая кнопки «ОК» (для применения новых разрешений).
После этого, остается только удалить значение реестра с названием L$RTMTIMEBOMB...
, после чего перезагрузить сервер. Если все было сделано правильно, то пробный период будет активирован по новой, и пользователи смогут работать на данном сервере как раньше.
If you have a home lab environment or another lab where 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. I am using Windows Server 2019 for my Windows workloads in my lab environment. In this post, I will show how to reset 120 day RDS licensing 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 you generally have available for administering.
However, when you install the true Remote Desktop Services role, you can have multiple sessions on your server. This is similar to the legacy Terminal Server role in previous versions of windows.
Production vs testing purposes
Typically in a production environment, you will have remote desktop license servers that house the client access licenses and then you will have multiple session host server instances configured for hosting user sessions.
When you install the role, by default, you have a 120-day grace period that Microsoft gives you to license the server for use as an RDS installation properly. This is accomplished by configuring remote desktop license servers with client access licenses. 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 in a testing environment, using a license server with a remote desktop session host.
RDS grace period error message
Once the 120 day grace period has expired, you will see the following error when you attempt to RDP to the server, referring to the licensing server needed for the proper license past the grace period:
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 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. Creating a quick snapshot of the Windows virtual machine before you begin is always a good practice if you are working with a virtual machine.
Overview of resetting the grace period
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:
- Change permissions on the RCM > GracePeriod key
- Delete the “Timebomb” registry entry
- 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 key location on your RDS server:
Computer\\HKEY_LOCAL_MACHINE\\SYSTEM\CurrentControlSet\\Control\\Terminal Server\\RCM\\GracePeriod
Change Permissions on the RDS GracePeriod key and delete the key
Open a command prompt, and type regedit. After you have navigated to the key documented above, right-click GracePeriod and select Permissions.
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.
Click the Change button next to the Owner.
Here I have selected local administrators group as the owner of the key. However, you will want to choose whichever user/group you want to use to delete the registry key. Select the options to replace owners and replace all child object permissions.
Confirm the replacement of permissions on the registry key.
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.
Now, with permissions set, right-click the timebomb value in the GracePeriod key and Delete.
Confirm the deletion of the registry entry.
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
Wrapping up
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 to have a fresh 120 day 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)
So we recently started looking into Terminal Services and RemoteFX to power some of our admin users and move them off to thin clients instead of full blown desktops. As a trial I begun setting up RDS on one of our Dev machines. After going through the motions of enabling the Remote Desktop Features and setting up RemoteFX on a Virtual Machine for testing, I found that I couldn’t login via RDP to that machine. Going back to the RDS host I found the Licensing popup that informed me that the 128 day trial license had expired. Since this was a test I didn’t want to go using keys to activate or setup a licensing server (purely a PoC for us in IT at this stage).
To reset the grace period there is a registry key that we need to delete. As always when editing the registry, take a backup of the key/s you’re modifying. Navigate to the following location
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\GracePeriod
Now there should be a binary key value (like in the screenshot), you first need to have full access permissions to the folder (or take ownership) and then simply delete that value and reboot the server. Once back up your RDS Licensing should be back at the start of a 128 Day grace period. I wouldn’t do this if you have already obtained licensing and should definitely not be used in a production environment.
The 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.
The official solution is to Activate the RDS/TS CAL License server and point the Server to License server with User/Device License and will be resolve the problem, but if you want to reset the timer and again avail the 120 days grace time here is the solution:
Delete the REG_BINARY in:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\GracePeriod
To delete the key you must take ownership and give admin users full control.
After a restart of the server RDS will reset the grace period to 120 days.