HOW TO RESET THE 120DAY GRACE PERIOD ON SERVER RDS

Diana Moraa
5 min readFeb 11, 2022

OPTION 1: HOW TO RESOLVE THE TERMINAL SERVER LICENSE ISSUE

By default the terminal server license will work for 180 days for free in server 20008 and while in server 2012 and above the free license period is 120 days.

Since the remote desktop service is not working due to trial expiration direct;

Click Win key+R

Mstsc from run will not work…

You should use mstsc /admin to connect to the console of the server

It will bring up the remote desktop connection where you will input the IP address and the username and password of your server

This will lead us to the server and server manager where we can do configurations

STEPS

  1. Open the registry editor by running the regedit command to access the registry

Go to the local machine, then system, current control set, terminal server, RCM, Grace period

Delete the following key grace period;

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

Only leaving the default

Note: You must take ownership and give admin users full control to be able to delete this key

After deleting the registry , Go to services.msc

Configure and restart remote desktop services and remote desktop configuration. This will restart the dependent services also.

Restart the server for changes to take effect. The grace period will be restored back to 120 days

OPTION 2: USING THE GOOGLE CLOUD SERIAL CONSOLE

After the 120 days the GCP host licensing expires and hence the need to reset…With the expiry comes a loss of access to a windows server hosted on cloud.A user who wants to access the machine via RDP anything won’t be able to do so because access has been denied.

Being unable to connect to the machine by other means, you can leverage the serial port connection option provided by the google cloud web console..

First we will connect to the machine and we will access a windows command prompt

To perform this, you need the

  • compute.instances.setmetadata
  • compute.projects.setCommonInstancemetadata

STEP 1: NAVIGATE AND CONNECT TO THE INSTANCE VIA THE SERIAL CONSOLE

The windows serial access console allows you to interact with the windows operating system. It provides access even when networking is not functional. It also provides a very basic set of commands for OS management.

STEP 2: CONNECT TO A WINDOWS COMMAND PROMPT

To do this, we’ll create a new channel that provides access to the windows command prompt that we know and love.

In the SAC, we will use the cmd command to start another channel. The system will respond with a confirmation message for the new channel .The new channel is ‘Cmd0001’ and we change it using the command ch -sn Cmd0001.

The system will display the new channel detail and you will enter any key to view the channel

The ch -sn Cmd0001 command changes the serial console to the new channel specified.

The windows command prompt will provide full access to the machine .Enter the username, password and domain.if machine is not on domain level , leave it blank

With the right credentials, you will be authenticated to access the machine and perform /write commands.

The number of days before the end of the RDS Grace Period can be found from the elevated command prompt:

wmic /namespace:\\root\CIMV2\TerminalServices PATH Win32_TerminalServiceSetting WHERE (__CLASS !=””) CALL GetGracePeriodDays

To extend the grace period in RDS, you need to remove the registry parameter on the server, which determines the grace period licensing time. The date that determines the RDS grace period for the server is stored in the reg_binary registry parameter L$RTMTIMEBOMB located in the following registry key

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

Delete the grace period registry leaving the default, Using this command line, make sure if the RDS licensing server is set:

$obj = gwmi -namespace “Root/CIMV2/TerminalServices” Win32_TerminalServiceSetting$obj.SetSpecifiedLicenseServerList(“lon-rdslic.woshub.com”)

--

--

Diana Moraa

Passionate and motivated about Cloud Computing technology because it continues to allow us to modernize, consolidate IT infrastructure and automate workloads.