Problem: RD Licensing Manager service does not start
Step 1:
1.- Remove the RDS role
2.- Delete or rename the folder C:\Windows\System32\LServer (this is where the database file lives)
3.- Install the RDS role – the LServer folder will be created from scratch so no license will be there
Extra
4.- Just in case, enable the feature RD Connection Broker if the server is intended for supporting several connections
Step 2:
To troubleshoot this issue effectively, please take the following steps:
Open Server Manager
Expand Roles and click on Remote Desktop Services.
You should see an error in the events of this role.
Go through the errors and see if you spot the following error:
The Remote Desktop Licensing service cannot start. The following error occurred: Can’t initialize Cryptographic – error code 5.
After going through numerous articles on how to solve this to no avail, I decided to look deeper into the issue.
This issue is being caused by the RSA cryptographic files losing their permissions, thus locking out the licensing manager and disabling it naturally.
To solve this issue, open up Run on your server and insert the following path:
C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys
Please verify if all permissions on these files are set correctly. On Server 2008, you should see a little “lock” symbol over the files if the permissions are set incorrectly. Please ensure the following permissions are set:
System: Full Control
Administrator: Full Control
Domain Admins: Full Control
Network Service: Full Control
After these permissions have been set successfully, try and start the RD Licensing Service now, which should solve your problem.
Or from CMD:
command in cmd (run as administrator):
icacls “C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys” /grant “NT AUTHORITY\NetworkService”:(OI)(CI)(F)