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)
tomuse says
both Solution are not working under Windows Server 2016, i have tested it in Hyper-V.
Rob G says
Just tested on Windows Server 2016 vMware and did work.
Vladan SEGET says
Thanks for sharing your experience Rob.
Vassilis says
On the contrary!
The first option, the deletion of the registry key, worked like a charm on a Windows 16 version 1607.
Vladan SEGET says
Thanks for confirmation Vassilis. Glad to hear that.
Vassilis says
On the contrary!
The deletion of the registry key, worked like a charm on Windows 2016 version 1607.
Thank you for the tip!
ohlssrog says
None of the solutions works, 1 windows 2012 R2 with RDSH and connected to remote Windows 2012 R2 RDS license with 250 CAL, have set GPO to point to remote server with per user mode.
After delete the regkey its back after reboot server and server gets in 120 days licens
Joseph Thekkiniath says
Hello Everyone,
I am also facing the same issue. The graceperiod in regedit is coming again and again after the restart. I have deleted so many time and restarted the server. no luck!
Is there any other solution is available? Please help me…
Thanks
Jose
herman says
1. Download script from microsoft (https://gallery.technet.microsoft.com/scriptcenter/Reset-Terminal-Server-RDS-44922d91)
2. Right Click Windows powershell run as administrator
3. point to directory where your download file is
4. execute that file (Y and Y)
5. you will see in tray icon there is pop up saying grace back to 119 days
ÖZGÜR GÜNEŞ says
Thank you
soner says
thankksss a lot. you are save my life 🙂
Ahsan Reza says
I followed the first step and it worked like a charm. Just one problem that one of my software doesn’t work. I double click it and it briefly shows a window and disappears. I can see the program running in the processes but i can’t see it opened.
Please help.
Dan says
First time I tried it, it did not work. The counter reset but when the original grace period ended I was not able to authenticate to the servers. I resolved it by repeating the process but also opening regedit by right clicking and hitting run as administrator. Just an FYI for anyone who had issues with this process.
Vladan SEGET says
Thanks for the feedback Dan, much apreciated.
MS says
Solution Workes perfectly even on Cloud machine..Thxxx a lot
Rob says
Works like a charm on Server 2019 as well. Thank you very much for the post! This has saved me many hours in my Dev and UAT environments!
Tim says
Great article Vladan and great feedback from the users!
My question is how would one go about changing the grace period value? I am testing a license server change from Microsoft for customers in workgroups that need to (legally) remove the RDS simultaneous user cap of 2, and I would like to validate the change. However, the grace period as is prohibits an acid test until it expires — hence my goal of setting the grace period to one or zero.
Thanks,
Tim
Tom says
Thank you – lifesaver.
Pablo says
muchas gracias, me salvo la vida
Prakash Kumar says
Hey, I am the author of the Powershell script that you mentioned in the second option and it seems Microsoft has taken the script down so you might wanna update the content, It is now available at my blog 🙂 https://adminthing.blogspot.com/2016/05/reset-ts-rds-grace-period.html
Vladan SEGET says
Hi Kumar, Thanks for this. I have updated the post.
Prakash Kumar says
Thanks cheers !!
Pete says
Hi
I use the administrator account and can’t delete the key anymore in the registery or even change persmission, I think microsoft did anything ?
Help me please.
MMAniac911 says
I can’t delete the Key or Give Admins permissions anymore either. However, it still seems to work, I can log into my WebUI and run apps that I shared…
vassili says
Hi, did not work on W16, I can’t give admins permissions.
Any idea ?
TY.
Shawn says
Just worked for me. Make sure to use administrator account as I tried with a different account with admin rights and couldnt get it to work. I did have to change permissions as stated above.
Vladan SEGET says
Thanks for your feedback, Shawn. Much appreciated by the community.