Win32_TSLogonSetting class

The Win32_TSLogonSetting WMI class defines configuration settings for the Win32_Terminal class related to client logon.

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_TSLOGONSETTING_Prov"), ClassContext("local|hkey_local_machine\\SYSTEM\\CurrentControlSet\\Control\\TerminalServer\\WinStations"), AMENDMENT]
class Win32_TSLogonSetting : Win32_TerminalSetting
{
  string   Caption;
  string   Description;
  datetime InstallDate;
  string   Name;
  string   Status;
  string   TerminalName;
  uint32   ClientLogonInfoPolicy;
  string   Domain;
  string   Password;
  uint32   PolicySourceDomain;
  uint32   PolicySourcePromptForPassword;
  uint32   PolicySourceUserName;
  uint32   PromptForPassword;
  string   UserName;
};

Members

The Win32_TSLogonSetting class has these types of members:

Methods

The Win32_TSLogonSetting class has these methods.

Method Description
ExplicitLogon Sets the UserName, Password, and Domain authentication credentials.
SetPromptForPassword Sets the PromptForPassword property.

Properties

The Win32_TSLogonSetting class has these properties.

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.

ClientLogonInfoPolicy

Data type: uint32

Access type: Read/write

The policy the server uses to determine connection settings.

Per User (0)

Individual user connection settings are in effect.

Server-Override (1)

Individual user connection settings are overridden by the server.

Description

Data type: string

Access type: Read-only

Description of the object.

This property is inherited from CIM_ManagedSystemElement.

Domain

Data type: string

Access type: Read-only

The user's domain logon authentication credential. This is the domain in which the user's computer resides. This property cannot be longer than 17 characters.

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.

Password

Data type: string

Access type: Read-only

The user's password logon authentication credential. This property cannot be longer than 14 characters. It is recommended that you set the security level to packet privacy (wbemAuthenticationLevelPktPrivacy = 6) if you query this property. This is because the password is not encrypted on the wire without this level of security. For more information about setting security levels, see Setting Client Application Process Security in the WMI SDK documentation.

PolicySourceDomain

Data type: uint32

Access type: Read-only

Indicates whether the Domain property is configured by the server, group policy, or by default.

0

Server

1

Group policy

2

Default

PolicySourcePromptForPassword

Data type: uint32

Access type: Read-only

Indicates whether the PromptForPassword property is configured by the server, group policy, or by default.

0

Server

1

Group policy

2

Default

PolicySourceUserName

Data type: uint32

Access type: Read-only

Indicates whether the UserName property is configured by the server, group policy, or by default.

0

Server

1

Group policy

2

Default

PromptForPassword

Data type: uint32

Access type: Read-only

Specifies whether the user is always prompted for a password while logging into the server.

FALSE (0)

The user is not prompted for a password.

TRUE (1)

The user is prompted for a password.

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.

UserName

Data type: string

Access type: Read-only

The user's user name logon authentication credential. This property cannot be longer than 20 characters.

Remarks

Be aware that Winstations associated with the console session cannot access the methods and properties of this class. If an attempt is made to do so by specifying "Console" as the value of the TerminalName property, methods of this object return WBEM_E_NOT_SUPPORTED. This error code is returned if a window station attempts to call methods of this object to add or modify the security properties of the LocalSystem, LocalService, or NetworkService accounts.

To connect to the \root\CIMV2\TerminalServices namespace, the authentication level must include packet privacy. For C/C++ calls, this is an authentication level of RPC_C_AUTHN_LEVEL_PKT_PRIVACY. For Visual Basic and scripting calls, this is 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
TSCfgWmi.mof
DLL
TSCfgWmi.dll

See also

Win32_Terminal

Win32_TerminalSetting