Win32_TSAccount class
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, overwrite, provider("Win32_WIN32_TSACCOUNT_Prov"), ClassContext("local|hkey_local_machine\\SYSTEM\\CurrentControlSet\\Control\\TerminalServer\\WinStations"), AMENDMENT]
class Win32_TSAccount : Win32_TerminalSetting
{
string Caption;
string Description;
datetime InstallDate;
string Name;
string Status;
string TerminalName;
string AccountName;
uint32 AuditFail;
uint32 AuditSuccess;
uint32 PermissionsAllowed;
uint32 PermissionsDenied;
string SID;
};
Members
The Win32_TSAccount class has these types of members:
Methods
The Win32_TSAccount class has these 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 has these 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.
-
-
WINSTATION_QUERY=0x1 (0)
-
WINSTATION_SET=0x2 (1)
-
WINSTATION_LOGOFF=0x4 (2)
-
WINSTATION_VIRTUAL | STANDARD_RIGHTS_REQUIRED = 0xF008 (3)
-
WINSTATION_SHADOW=0x10 (4)
-
WINSTATION_LOGON=0x20 (5)
-
WINSTATION_MSG=0x80 (6)
-
WINSTATION_CONNECT=0x100 (7)
-
WINSTATION_DISCONNECT=0x200 (8)
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.
WINSTATION_QUERY=0x1 (0)
WINSTATION_SET=0x2 (1)
WINSTATION_LOGOFF=0x4WINSTATION_VIRTUAL | STANDARD_RIGHTS_REQUIRED = 0xF008 (2)
WINSTATION_SHADOW=0x10 (3)
WINSTATION_LOGON=0x20 (4)
WINSTATION_MSG=0x80 (5)
WINSTATION_CONNECT=0x100 (6)
WINSTATION_DISCONNECT=0x200 (7)
Caption
-
Data type: string
-
Access type: Read-only
-
Qualifiers: MaxLen (64)
Short description (one-line string) of the object.
This property is inherited from CIM_ManagedSystemElement.
Description
-
Data type: string
-
Access type: Read-only
Description of the object.
This property is inherited from CIM_ManagedSystemElement.
InstallDate
-
Data type: datetime
-
Access type: Read-only
-
Qualifiers: Mappingstrings ("MIF.DMTF|ComponentID|001.5")
The date the object was installed. A lack of a value does not indicate that the object is not installed.
This property is inherited from CIM_ManagedSystemElement.
Name
-
Data type: string
-
Access type: Read-only
The name of the object.
This property is inherited from CIM_ManagedSystemElement.
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.
WINSTATION_QUERY=0x1 (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.
WINSTATION_QUERY=0x1 (0)
WINSTATION_SET=0x2 (1)
WINSTATION_LOGOFF=0x4 (2)
WINSTATION_VIRTUAL | STANDARD_RIGHTS_REQUIRED = 0xF008 (3)
WINSTATION_SHADOW=0x10 (4)
WINSTATION_LOGON=0x20 (5)
WINSTATION_MSG=0x80 (6)
WINSTATION_CONNECT=0x100 (7)
WINSTATION_DISCONNECT=0x200 (8)
SID
-
Data type: string
-
Access type: Read-only
Specifies the Security Identifiers of the account.
Status
-
Data type: string
-
Access type: Read-only
-
Qualifiers: MaxLen (10)
Current status of the object. Various operational and nonoperational statuses can be defined. Operational statuses include: "OK", "Degraded", and "Pred Fail" (an element, such as a SMART-enabled hard disk drive, may be functioning properly but predicting a failure in the near future). Nonoperational statuses include: "Error", "Starting", "Stopping", and "Service". The latter, "Service", could apply during mirror-resilvering of a disk, reload of a user permissions list, or other administrative work. Not all such work is on-line, yet the managed element is neither "OK" nor in one of the other states.
This property is inherited from CIM_ManagedSystemElement.
("OK")
("Error")
("Degraded")
("Unknown")
("Pred Fail")
("Starting")
("Stopping")
("Service")
TerminalName
-
Data type: string
-
Access type: Read-only
The name of the terminal.
This property is inherited from Win32_TerminalSetting.
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 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 |
|
DLL |
|