The Win32_TSAccount WMI class allows deletion of an account that exists on the
Win32_Terminal and modification of existing
permissions.
The following syntax is simplified from MOF code and includes all defined and inherited properties, in alphabetical order. For reference
information on methods, see the table of methods later in this topic.
Syntax
[dynamic, provider("Win32_WIN32_TSACCOUNT_Prov")]class Win32_TSAccount : Win32_TerminalSetting
{
string AccountName;
uint32 AuditFail;
uint32 AuditSuccess;
string Caption;
string Description;
uint32 PermissionsAllowed;
uint32 PermissionsDenied;
string SettingID;
string SID;
string TerminalName;
};
Methods
The Win32_TSAccount class defines the following methods.
| Method | Description |
Delete |
Deletes the specified user, group, or computer account.
|
ModifyAuditPermissions |
Changes the granularity of the set of audit permissions of the specified account.
|
ModifyPermissions |
Sets a more granular permission set to the specified account.
|
Properties
The Win32_TSAccount class defines the following properties.
- AccountName
-
- Data type: string
- Access type: Read-only
- Qualifiers: Key
The current name of the account. The domain name is included.
- AuditFail
-
- Data type: uint32
- Access type: Read-only
Specifies the Remote Desktop Session Host Services Permissions that are audited for a failure condition. The value of this property is a bitmask, which can
be set to one or more of the values of the PermissionsAllowed property.
- AuditSuccess
-
- Data type: uint32
- Access type: Read-only
Specifies the RD Session Host server-specific permissions that are audited for a success condition. The value of
this property is a bitmask, which can be set to one or more of the values of the
PermissionsAllowed property.
- Caption
-
- Data type: string
- Access type: Read-only
- Qualifiers: MaxLen(64)
Short textual description (one-line string) of the
CIM_Setting object. This property is inherited from
CIM_Setting.
- Description
-
- Data type: string
- Access type: Read-only
Description of the CIM_Setting object. This property
is inherited from CIM_Setting.
- PermissionsAllowed
-
- Data type: uint32
- Access type: Read-only
Specifies the Remote Desktop Services Permissions allowed for the account. The value of this property is a bitmask, which can
be set to one or more of the following values.
| Value | Meaning |
- WINSTATION_QUERY
- 1
| Permission to query information about a session.
|
- WINSTATION_SET
- 2
| Permission to modify connection parameters.
|
- WINSTATION_RESET
- 64
| Permission to reset or end a session or connection.
|
- WINSTATION_VIRTUAL | STANDARD_RIGHTS_REQUIRED
- 983048
| Permission to use virtual channels. Virtual channels provide access from a server program to client
devices.
|
- WINSTATION_SHADOW
- 16
| Permission to shadow or remotely control another user's session.
|
- WINSTATION_LOGON
- 32
| Permission to log on to a session on the server.
|
- WINSTATION_LOGOFF
- 4
| Permission to log off a user from a session.
|
- WINSTATION_MSG
- 128
| Permission to send a message to another user's session.
|
- WINSTATION_CONNECT
- 256
| Permission to connect to another session.
|
- WINSTATION_DISCONNECT
- 512
| Permission to disconnect a session.
|
- PermissionsDenied
-
- Data type: uint32
- Access type: Read-only
Specifies the RD Session Host server-specific permissions disallowed for the account. The value of this property is
a bitmask, which can be set to one or more of the values of the
PermissionsAllowed property.
- SettingID
-
- Data type: string
- Access type: Read-only
- Qualifiers: MaxLen(256)
Identifier by which the CIM_Setting object is known.
This property is inherited from CIM_Setting.
- SID
-
- Data type: string
- Access type: Read-only
Specifies the Security Identifiers of the
account.
- TerminalName
-
- Data type: string
- Access type: Read-only
- Qualifiers: Key
The name of the terminal.
Remarks
To connect to the \root\CIMV2\TerminalServices namespace, the authentication level must include packet
privacy. For C/C++ calls, this would be an authentication level of
RPC_C_AUTHN_LEVEL_PKT_PRIVACY. For Visual Basic and scripting calls, this would be an
authentication level of WbemAuthenticationLevelPktPrivacy or "pktPrivacy", with a value
of 6. The following Visual Basic Scripting Edition (VBScript) example shows how to connect to a remote computer
with packet privacy.
strComputer = "RemoteServer1"
Set objServices = GetObject( _
"winmgmts:{authenticationLevel=pktPrivacy}!Root/CIMv2/TerminalServices")
Managed Object Format (MOF) files contain the definitions for Windows Management Instrumentation (WMI) classes. MOF files are not installed as part of the Windows 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 XP |
| Minimum supported server | Windows Server 2003 |
| MOF | Tscfgwmi.mof |
| DLL | Tscfgwmi.dll |
| Namespace | \root\CIMV2\TerminalServices on Windows Vista and Windows Server 2008\root\CIMV2 on Windows XP and Windows Server 2003 |
See Also
- Win32_TerminalSetting
Send comments about this topic to Microsoft
Build date: 10/19/2009