How to fix Remote Desktop Server License Expiration error Windows Server 2012 and 2016

The problem comes due to the builtin trial licenses which are available for 120 days.

Open gpedit.msc and go to Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Licensing.

Open the setting “Use the specified Remote Desktop license servers”. Click on Enabled and enter the FQDN of the server holding the licenses. Then open “Set the Remote Desktop licensing mode”. Click on Enabled and set to user. After this do a gpedit/force. After this you should be able to connect to the server again. Otherwise a reboot will do the trick.

Close Menu