having trouble configuring license mode on RDS 2012 server?

here is a good article that helps me everytime im installing RDS servers

So thank you Matt Fusaro


update: 21-08-2018

In case you get the following

Exception calling “SetSpecifiedLicenseServerList” : “Invalid operation “

Make sure that you start powershell as administrator.

Since that didnt work either for me i found a registry key for it

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services

Works on Windows 2012R2 and Windows 2016 servers