Export (0) Print
Expand All

Win32_TSSessionSetting class

The Win32_TSSessionSetting WMI class defines configuration settings for the Win32_Terminal class such as time-limits, and disconnection and reconnection actions.

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_TSSESSIONSETTING_Prov")]class Win32_TSSessionSetting : Win32_TerminalSetting
{
  uint32 ActiveSessionLimit;
  uint32 BrokenConnectionAction;
  uint32 BrokenConnectionPolicy;
  string Caption;
  string Description;
  uint32 DisconnectedSessionLimit;
  uint32 IdleSessionLimit;
  uint32 PolicySourceActiveSessionLimit;
  uint32 PolicySourceBrokenConnectionAction;
  uint32 PolicySourceDisconnectedSessionLimit;
  uint32 PolicySourceIdleSessionLimit;
  uint32 PolicySourceReconnectionPolicy;
  uint32 ReconnectionPolicy;
  string SettingID;
  string TerminalName;
  uint32 TimeLimitPolicy;
};

Members

The Win32_TSSessionSetting class has these types of members:

Methods

The Win32_TSSessionSetting class has these methods.

MethodDescription
BrokenConnection

Sets the broken connection properties included in this class.

TimeLimit

Sets the time-limit properties included in this class.

 

Properties

The Win32_TSSessionSetting class has these properties.

ActiveSessionLimit
Data type: uint32
Access type: Read-only

The maximum amount of time, in milliseconds, allocated to an active session. A value of 0 specifies an infinite amount of time.

BrokenConnectionAction
Data type: uint32
Access type: Read-only

The action the server takes on the session when a connection has been broken due to network loss or exceeded time-limits.

ValueMeaning
Disconnect
0

The user is disconnected from the session.

Terminate
1

The session is permanently deleted from the server.

 

BrokenConnectionPolicy
Data type: uint32
Access type: Read/write

The policy the server uses to determine when to break a connection because of network loss or exceeded time-limits.

ValueMeaning
Server Override
0

The user's disconnection policy settings are overridden by the server.

Per User
1

The user's disconnection policy settings are in effect.

 

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.

DisconnectedSessionLimit
Data type: uint32
Access type: Read-only

The time interval, in milliseconds, after which a disconnected session is terminated. A value of 0 specifies an infinite amount of time.

IdleSessionLimit
Data type: uint32
Access type: Read-only

The time interval, in milliseconds, after which an idle session is terminated. A value of 0 specifies an infinite amount of time.

PolicySourceActiveSessionLimit
Data type: uint32
Access type: Read-only

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

Windows Server 2003 and Windows XP:  This property is not available.

ValueMeaning
0

Server

1

Group policy

2

Default

 

PolicySourceBrokenConnectionAction
Data type: uint32
Access type: Read-only

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

Windows Server 2003 and Windows XP:  This property is not available.

ValueMeaning
0

Server

1

Group policy

2

Default

 

PolicySourceDisconnectedSessionLimit
Data type: uint32
Access type: Read-only

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

Windows Server 2003 and Windows XP:  This property is not available.

ValueMeaning
0

Server

1

Group policy

2

Default

 

PolicySourceIdleSessionLimit
Data type: uint32
Access type: Read-only

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

Windows Server 2003 and Windows XP:  This property is not available.

ValueMeaning
0

Server

1

Group policy

2

Default

 

PolicySourceReconnectionPolicy
Data type: uint32
Access type: Read-only

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

Windows Server 2003 and Windows XP:  This property is not available.

ValueMeaning
0

Server

1

Group policy

2

Default

 

ReconnectionPolicy
Data type: uint32
Access type: Read/write

Specifies whether a user must use the previous client to reconnect to a disconnected session.

ValueMeaning
Any client
0

Any client will be used to reconnect.

Previous client
1

The previous client used in a connection will be used to reconnect.

 

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.

TerminalName
Data type: string
Access type: Read-only
Qualifiers: Key

The name of the terminal.

TimeLimitPolicy
Data type: uint32
Access type: Read/write

The policy the server uses to determine time-limits for user sessions.

ValueMeaning
Per User
1

The user's time-limits policy settings are in effect.

Server Override
0

The user's time-limits policy settings are overridden by the server.

 

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 will return WBEM_E_NOT_SUPPORTED. This error code will also be returned if a window station attempts to call methods of this object for the purpose of adding or modifying 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 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

Minimum supported client

Windows XP

Minimum supported server

Windows Server 2003

Namespace

\root\CIMV2\TerminalServices on Windows Vista and Windows Server 2008, \root\CIMV2 on Windows XP and Windows Server 2003

MOF

Tscfgwmi.mof

DLL

Tscfgwmi.dll

See also

Win32_TerminalSetting
CIM_Setting

 

 

Show:
© 2014 Microsoft