There are 2 ways to do that:
- Open Server Manager.
- Navigate to the Remote Desktop Services navigation area.
- Select the Overview branch.
- Under the Deployment Overview area, select Edit Deployment Properties from the Tasks menu.
- Select the RD Licensing page of the displayed dialog.
- Specify the licensing mode and the license server, then click OK.
Or it’s possible to use Group Policy:
RUN gpedit.msc
Go to:
Computer Configuration\Policies\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Licensing\
here you will see “Set the Remote Desktop licensing mode policy” key to set the mode (per user o per device)