Win32_TSEnvironmentSetting class

The Win32_TSEnvironmentSetting WMI class defines the configuration settings for the Win32_Terminal class including initial program policy.

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_TSENVIRONMENTSETTING_Prov"), ClassContext("local|hkey_local_machine\\SYSTEM\\CurrentControlSet\\Control\\TerminalServer\\WinStations"), AMENDMENT]
class Win32_TSEnvironmentSetting : Win32_TerminalSetting
{
  string   Caption;
  string   Description;
  datetime InstallDate;
  string   Name;
  string   Status;
  string   TerminalName;
  uint32   ClientWallPaper;
  string   InitialProgramPath;
  uint32   InitialProgramPolicy;
  uint32   PolicySourceClientWallPaper;
  uint32   PolicySourceInitialProgramPath;
  uint32   PolicySourceStartIn;
  string   Startin;
};

Members

The Win32_TSEnvironmentSetting class has these types of members:

Methods

The Win32_TSEnvironmentSetting class has these methods.

Method Description
InitialProgram Sets the startup program properties included in this class.
SetClientWallPaper Sets the ClientWallPaper property.

Properties

The Win32_TSEnvironmentSetting 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.

ClientWallPaper

Data type: uint32

Access type: Read-only

Specifies whether the wallpaper image is displayed on the client. Not displaying the wallpaper image can save system resources by decreasing the time required to repaint the screen.

False (0)

The wallpaper image is not displayed on the client.

True (1)

The wallpaper image is displayed on the client.

Description

Data type: string

Access type: Read-only

Description of the object.

This property is inherited from CIM_ManagedSystemElement.

InitialProgramPath

Data type: string

Access type: Read-only

The name and the path of the program the user will run immediately after logging on to the RD Session Host server.

InitialProgramPolicy

Data type: uint32

Access type: Read/write

The policy the server uses to determine the startup program path and file name, and the name of the folder it is located in.

Per User (0)

The user's startup program settings are in effect.

Server-Override (1)

The user's startup program settings are overridden by the server.

Single-App Mode (2)

Only a single application will be run in this session. The startup program information is ignored.

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.

PolicySourceClientWallPaper

Data type: uint32

Access type: Read-only

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

0

Server

1

Group policy

2

Default

PolicySourceInitialProgramPath

Data type: uint32

Access type: Read-only

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

0

Server

1

Group policy

2

Default

PolicySourceStartIn

Data type: uint32

Access type: Read-only

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

0

Server

1

Group policy

2

Default

Startin

Data type: string

Access type: Read-only

The path of the working directory of the program the user will run immediately after logging on to the RD Session Host server.

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

Be aware that Winstations that are 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 also 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_TerminalSetting