Hi,
Please follow below steps to remove “Remote Desktop Licensing Service”.
- Open “Server Manager”, click “Add roles and features”.
- Click “Start the Remove Roles and Features Wizard"
- Keep next until “Select server roles”, uncheck “Remote Desktop Licensing” -> “Remove features”->Next
- Check “Restart the destination server automatically if required” -> Click “Remove”
- Run "get-windowsfeature " in PowerShell to double confirm below roles has not been installed.
[ ] Remote Desktop Services
[ ] Remote Desktop Connection Broker
[ ] Remote Desktop Gateway
[ ] Remote Desktop Licensing
[ ] Remote Desktop Session Host
[ ] Remote Desktop Virtualization Host
[ ] Remote Desktop Web Access
Meanwhile, if you would like to reinstall the RDS role, please refer to below link which contains detailed steps for RDS deployment.
https://nedimmehic.org/2017/01/21/deploying-remote-desktop-services-2016-step-by-step/
This is second part for your error message "The RD Licensing grace period has expired and Licensing mode for the Remote Desktop Session Host server has not been configured. Licensing mode must be configured for continuous operation." Please try below steps to see if that could resolve.
On the remote session host server, open "Registry Editor" -> find "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\GracePeriod"->right click "Graceperiod"->Permissions-> change the owner of the registry key->delete L$RTMTIMEBO..
Thanks,
Eleven