SetSecurityLayer method of the Win32_TSGeneralSetting class

The SetSecurityLayer method sets the security layer.

Syntax

uint32 SetSecurityLayer(
  [in] uint32 SecurityLayer
);

Parameters

SecurityLayer [in]

The security layer to set. If the current Encryption Level is 1, then a value of 2 for SecurityLayer is not valid.

RDP Security Layer (0)

Communication between the server and the client will use native RDP encryption.

Negotiate (1)

The most secure layer that is supported by the client will be used. If supported, SSL (TLS 1.0) will be used.

SSL (2)

SSL (TLS 1.0) will be used for server authentication as well as for encrypting all data transferred between the server and the client. This setting requires the server to have an SSL compatible certificate. This setting is not compatible with a MinEncryptionLevel value of 1.

Return value

Returns Success 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

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

See also

Win32_TSGeneralSetting

SetEncryptionLevel