Setting RDS/TS Licensing Server via WMI results in “Invalid Operation”

coollogo_com-79311929Background Info

So I was chugging right along, I issued a command like the one below and then all of a sudden I received an “Invalid Operation” error. What should I try to resolve this error?

$obj = gwmi -namespace “Root/CIMV2/TerminalServices” Win32_TerminalServiceSetting
$obj.SetSpecifiedLicenseServerList(“licensingserver”)

SetSpecifiedLicenseServerList

 

  1. Ensure that your account is a local admin on the server
  2. Ensure that you are launching Powershell as an administrator
  3. Ensure that Group Policy is not preventing you from making this change
    1. Browse to Computer Configuration -> Administrative Templates, Windows Templates, Terminal Services

Note: This “invalid operation” error can also appear when using theĀ RemoveLSFromSpecifiedLicenseServerList andĀ EmptySpecifiedLicenseServerList methods.

Sources

http://www.blackforce.co.uk/2014/02/17/2012-rds-server-the-remote-desktop-session-host-server-does-not-have-a-remote-desktop-license-server-specified
https://msdn.microsoft.com/en-us/library/windows/desktop/ff955672(v=vs.85).aspx