Microsoft Windows 2012 R2 Server might display an unlicensed status warning even after the licensing server has been installed and configured. This is because the licensing mode and server have not been set yet.
The procedure for assigning the licensing mode is to open Server Manager, Remote Desktop Services, and select Overview; from there, a GUI is supposed to make the licensing process relatively easy.
However, Windows may display:
"You are current logged on as local administrator on the computer. You must be logged on as a domain user to manage servers and collections."
This message prevents you from seeing the handy UI.
This is because Microsoft apparently didn't intend for you to run RD Services on a standalone server. However, it is perfectly fine to do so but you must configure the mode and server using the Global Policy Editor as follows:
1. Open GPEDIT.MSC.
2. Browse to the following folder: Computer Configuration\ Administrative Templates\ Windows Components\ Remote Desktop Services\ Remote Desktop Session Host\ Licensing
3. Enable the key: Use the specified Remote Desktop license servers. Declare your server. Save
4. Enable the key: Set the Remote Desktop licensing mode. Declare your licensing mode. Save
5. Shell to DOS with Admin privileges. Do a gpupdate /force on the box.
When you run your licensing diagnosis again, you'll find that the errors have gone away and you've successfully assigned the licensing model to the server.