Note The following commands must be ran from an Administrative PowerShell prompt.
$obj = gwmi -namespace "Root/CIMV2/TerminalServices" Win32_TerminalServiceSetting
$obj.SetSpecifiedLicenseServerList("TS1.DOMAIN.local")To change the licensing mode on RDSH/RDVH:
$obj = gwmi -namespace "Root/CIMV2/TerminalServices" Win32_TerminalServiceSetting $obj.ChangeMode(4)
Value can be:
2 = per Device
4 = per User