ChangeMode method of the Win32_TerminalServiceSetting class

The ChangeMode method sets the licensing type of the current Remote Desktop Session Host (RD Session Host) server.

Syntax

uint32 ChangeMode(
  [in] uint32 LicensingType
);

Parameters

LicensingType [in]

The licensing type to set based on the RD Session Host server mode.

0

Personal RD Session Host server.

1

Remote desktop for administration.

2

Per device/per seat. Valid for application servers.

4

Per User. Valid for application servers.

Return value

Returns 0 on success, otherwise returns a WMI error code. Refer to Remote Desktop Services WMI Provider Error Codes for a list of these values.

Remarks

Managed Object Format (MOF) files contain the definitions for Windows Management Instrumentation (WMI) classes. MOF files are not installed as part of the Microsoft Windows Software Development Kit (SDK). They are installed on the server when you add the associated role by using the Server Manager. For more information about MOF files, see Managed Object Format (MOF).

Requirements

Requirement Value
Minimum supported client
Windows Vista
Minimum supported server
Windows Server 2008
Namespace
Root\CIMv2\TerminalServices
MOF
TSCfgWmi.mof
DLL
TSCfgWmi.dll

See also

Win32_TerminalServiceSetting