To manually specify licensing server run this command as admin in powershell:
$srv = gwmi -namespace "Root/CIMV2/TerminalServices" Win32_TerminalServiceSetting;$srv.SetSpecifiedLicenseServerList("server.domain.local")
to specify licencing mode, run this as admin
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\Licensing Core" /v LicensingMode /t REG_DWORD /d 4 /f
where 4 is for per user and 2 is for per device