ModifyPermissions method of the Win32_TSAccount class

Sets a permission for the specified account.

Syntax

uint32 ModifyPermissions(
  [in] uint32  PermissionMask,
  [in] boolean Allow
);

Parameters

PermissionMask [in]

The Remote Desktop Session Host Permission to set.

The possible values are:

WINSTATION_QUERY (0)

Permission to query information about a session.

WINSTATION_SET (1)

Permission to modify connection parameters.

WINSTATION_RESET (6)

Permission to reset or end a session or connection.

WINSTATION_VIRTUAL | STANDARD_RIGHTS_REQUIRED (3)

Permission to use virtual channels. Virtual channels provide access from a server program to client devices.

WINSTATION_SHADOW (4)

Permission to shadow or remotely control another user's session.

WINSTATION_LOGON (5)

Permission to log on to a session on the server.

WINSTATION_LOGOFF (2)

Permission to log off a user from a session.

WINSTATION_MSG (7)

Permission to send a message to another user's session.

WINSTATION_CONNECT (8)

Permission to connect to another session.

WINSTATION_DISCONNECT (9)

Permission to disconnect a session.

Allow [in]

Specifies whether the permission in the PermissionMask parameter is allowed or denied.

The possible values are:

1

The specified permission set is allowed.

0

The specified permission set is denied.

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_TSAccount