AddAccount method of the Win32_TSPermissionsSetting class

The AddAccount method prepares to add an account to the terminal with the specified permission set. You can add users, groups, or computers.

Syntax

uint32 AddAccount(
  [in] string AccountName,
  [in] uint32 PermissionPreSet
);

Parameters

AccountName [in]

The name of the account to add to the terminal.

PermissionPreSet [in]

The set of permissions to associate with the specified account. This parameter can be any or all of the following values. For more information, see Remote Desktop Services Permissions.

WINSTATION_GUEST_ACCESS (0)

The account has Logon permission.

WINSTATION_USER_ACCESS (1)

The account has the following permissions: Logon, Query Information, Send Message, and Connect.

WINSTATION_ALL_ACCESS (2)

The account has all Remote Desktop Services Permissions.

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
Header
Faxcomex.h
MOF
TSCfgWmi.mof
DLL
TSCfgWmi.dll

See also

Win32_TSPermissionsSetting