A search through the internet reveals that I am not the only one experiencing this issue, and that it is related to MS Windows 2012 R2. The issue appears to arise specifically when you also don’t have a Domain Controller (DC) installed.
To remedy this issue for my friend, and to keep his business running, I RDP into the MS Windows 2012 R2 Server with the Admin rights. I then delete the GracePeriod registry key. The next step is to restart the Terminal Server service.
The registry key to be deleted can be found at:
“HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlTerminal ServerRCMGracePeriod”
To delete this registry key, you must change the ownership, as follows:
Right-Click–>Permissions–>Advanced–>Owner, Select Administrators, Apply.
This is a great temporary solution if you have to perform it once; but what if it keeps repeating itself? You have to run through this manual procedure every 120 days. Well, we have a solution; read on.
I wrote a short script, using the following commands, that will run the steps to achieve the same outcome. I then saved them into a “.cmd” file, and then set the MS Windows Scheduler to run the .cmd file every 119 days.
The commands to go into the .cmd script are:
setacl -on “HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlTerminal ServerRCMGracePeriod” -ot reg -actn setowner -ownr “n:administrators”
subinacl /keyreg “HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlTerminal ServerRCMGracePeriod” /setowner=administrator /grant=administrators=f
reg delete “HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlTerminal ServerRCMGracePeriod” /f
net stop TermService /y && net start TermService
Summary
With these quick steps, I offloaded this task to the MS Windows Scheduler. This keeps my friend happy and his business operating as he likes it. Obviously, I’m planning to migrate the workload to another cloud provider where I can upgrade the OS to MS Windows 2016, and will make sure the MS Windows RDP Server is deployed correctly.
In this blog post, I introduced and used two commands; the “setacl” and the “subinacl”. You can download those by clicking on the hyperlinked commands to open the comment boxes, and then clicking on the blue hyperlinks in the boxes to open their web pages.