Win32_TerminalServiceSetting class

The Win32_TerminalServiceSetting WMI class represents the configuration for a Remote Desktop Session Host (RD Session Host) server. Settings include capabilities such as RD Session Host server mode, licensing, Active Desktop, permissions, deletion of temporary folders, and temporary directories for sessions.

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_TERMINALSERVICESETTING_Prov"), ClassContext("local|hkey_local_machine\\SYSTEM\\CurrentControlSet\\Control\\TerminalServer"), AMENDMENT]
class Win32_TerminalServiceSetting : CIM_Setting
{
  string   Caption;
  string   Description;
  datetime InstallDate;
  string   Name;
  string   Status;
  string   ServerName;
  uint32   TerminalServerMode;
  uint32   GetCapabilitiesID;
  uint32   LicensingType;
  uint32   PolicySourceLicensingType;
  uint32   PossibleLicensingTypes;
  string   LicensingName;
  string   LicensingDescription;
  uint32   ActiveDesktop;
  uint32   UserPermission;
  uint32   DeleteTempFolders;
  uint32   PolicySourceDeleteTempFolders;
  uint32   UseTempFolders;
  uint32   PolicySourceUseTempFolders;
  uint32   AllowTSConnections;
  uint32   PolicySourceAllowTSConnections;
  uint32   SingleSession;
  uint32   PolicySourceSingleSession;
  string   ProfilePath;
  uint32   PolicySourceProfilePath;
  string   HomeDirectory;
  uint32   PolicySourceHomeDirectory;
  uint32   TimeZoneRedirection;
  uint32   PolicySourceTimeZoneRedirection;
  string   Logons;
  string   DirectConnectLicenseServers;
  uint32   PolicySourceDirectConnectLicenseServers;
  uint32   PolicySourceConfiguredLicenseServers;
  uint32   DisableForcibleLogoff;
  uint32   PolicySourceDisableForcibleLogoff;
  uint32   FallbackPrintDriverType;
  uint32   PolicySourceFallbackPrintDriverType;
  uint32   SessionBrokerDrainMode;
  uint32   LimitedUserSessions;
  uint32   EnableDFSS;
  uint32   PolicySourceEnableDFSS;
  uint32   EnableRemoteDesktopMSI;
  uint32   PolicySourceEnableRemoteDesktopMSI;
  uint32   EnableAutomaticReconnection;
  uint32   PolicySourceEnableAutomaticReconnection;
  uint32   UseRDEasyPrintDriver;
  uint32   PolicySourceUseRDEasyPrintDriver;
  uint32   RedirectSmartCards;
  uint32   PolicySourceRedirectSmartCards;
  uint32   EnableDiskFSS;
  uint32   EnableNetworkFSS;
  uint32   NetworkFSSUserSessionWeight;
  uint32   NetworkFSSLocalSystemWeight;
  uint32   NetworkFSSCatchAllWeight;
};

Members

The Win32_TerminalServiceSetting class has these types of members:

Methods

The Win32_TerminalServiceSetting class has these methods.

Method Description
AddDirectConnectLicenseServer Configures a new license server in the enterprise.
AddLSToSpecifiedLicenseServerList Adds the given license server to the end of the list of specified license servers.
CanAccessLicenseServer Determines whether the RD Session Host server is allowed to request Remote Desktop Services client access licenses (RDS CALs) from a Remote Desktop license server.
ChangeMode Sets the licensing type of the Remote Desktop license server.
CreateWinstation Creates a new listener stack based on the unique combination of listener name and NIC.
DeleteDirectConnectLicenseServer Deletes the specified license server from the enterprise.
EmptySpecifiedLicenseServerList Removes all license servers from the list of specified license servers.
FindLicenseServers Enumerates all of the Remote Desktop license servers and the method of discovery.
GetDomain Retrieves the name of the domain that the RD Session Host server is a member of.
GetGracePeriodDays Retrieves the number of days that are remaining in the RD Licensing grace period for an RD Session Host server.
GetRegisteredLicenseServerList Gets the list of registered license servers.
GetSpecifiedLicenseServerList Retrieves the list of specified license servers.
GetTSLanaIds Gets the IDs and descriptions of Remote Desktop Services network adapters.
GetTStoLSConnectivityStatus Determines the connectivity status between Remote Desktop Services and a license server.
GetWinstationDriverNames Retrieves a list of Winstation driver names.
PingLicenseServer Pings the license server to determine whether it is a valid license server.
RemoveLSFromSpecifiedLicenseServerList Removes the given license server from the list of specified license servers.
SetAllowTSConnections Sets the AllowTSConnections property.
SetDisableForcibleLogoff Sets the DisableForcibleLogoff property.
SetFallbackPrintDriverType Sets the FallbackPrintDriverType property.
SetHomeDirectory Sets the HomeDirectory property.
SetPolicyPropertyName Sets one of the following properties: DeleteTempFolders or UseTempFolders.
SetPrimaryLicenseServer Sets the given license server as the first entry in the list of specified license servers.
SetProfilePath Sets the ProfilePath property.
SetSingleSession Sets the SingleSession property.
SetSpecifiedLicenseServerList Updates the list of specified license servers, replacing any existing specified license servers.
SetTimeZoneRedirection Sets the TimeZoneRedirection property.
UpdateDirectConnectLicenseServer Updates the list of discovery license servers.

Properties

The Win32_TerminalServiceSetting class has these properties.

ActiveDesktop

Data type: uint32

Access type: Read/write

Specifies whether Active Desktop is allowed in each user session.

TRUE (0)

Active Desktop is not allowed in each user session.

FALSE (1)

Active Desktop is allowed in each user session.

AllowTSConnections

Data type: uint32

Access type: Read-only

Specifies whether new Remote Desktop Services connections are allowed.

FALSE (0)

New connections are not allowed.

TRUE (1)

New connections are allowed.

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.

DeleteTempFolders

Data type: uint32

Access type: Read-only

Specifies whether temporary directories are deleted on exit.

FALSE (0)

Deletion of temporary directories is disabled.

TRUE (1)

Deletion of temporary directories is enabled.

Description

Data type: string

Access type: Read-only

Description of the object.

This property is inherited from CIM_ManagedSystemElement.

DirectConnectLicenseServers

Data type: string

Access type: Read-only

Qualifiers: DEPRECATED

This property is not available.

Windows Server 2008: Enumerates the list of license servers.

DisableForcibleLogoff

Data type: uint32

Access type: Read-only

Determines whether an administrator that is logged on to the console can be forcibly logged off.

0

Administrator can be forcibly logged off.

1

Administrator cannot be forcibly logged off.

EnableAutomaticReconnection

Data type: uint32

Access type: Read/write

Specifies whether to allow Remote Desktop connection clients to automatically reconnect to sessions on an RD Session Host server if the network link is temporarily lost.

0 (0x0)

Automatic reconnection is disabled.

1 (0x1)

Automatic reconnection is enabled.

Windows Server 2008 R2 and Windows Server 2008: This property is not available.

EnableDFSS

Data type: uint32

Access type: Read/write

Indicates whether dynamic fair-share scheduling (DFSS) is enabled or disabled. This can be one of the following values.

Windows Server 2008: This property is unavailable prior to Windows Server 2008 R2.

0

DFSS is disabled.

1

DFSS is enabled.

EnableDiskFSS

Data type: uint32

Access type: Read/write

Specifies if disk fair share scheduling is enabled.

0 (0x0)

Disk fair share scheduling is disabled.

1 (0x1)

Disk fair share scheduling is enabled.

Windows Server 2008 R2 and Windows Server 2008: This property is not available.

EnableNetworkFSS

Data type: uint32

Access type: Read/write

Specifies if network fair share scheduling is enabled.

0 (0x0)

Network fair share scheduling is disabled.

1 (0x1)

Network fair share scheduling is enabled.

Windows Server 2008 R2 and Windows Server 2008: This property is not available.

EnableRemoteDesktopMSI

Data type: uint32

Access type: Read/write

Indicates whether the Remote Desktop MSI is enabled or disabled.

0 (0x0)

Disabled

1 (0x1)

Enabled

Windows Server 2008: This property is unavailable prior to Windows Server 2008 R2.

FallbackPrintDriverType

Data type: uint32

Access type: Read-only

Specifies which printer driver to fallback to.

No fallback dirvers=0 (0)

No fallback drivers.

Best guess=1 (1)

Best guess.

Best guess, if no match is found fallback to PCL=2 (2)

Best guess. If no match is found, fallback to Hewlett-Packard Printer Control Language (PCL).

Best guess, if no match is found fallback to PS=3 (3)

Best guess. If no match is found, fallback to Postscript (PS).

Best guess, if no match is found show both PCL and PS drivers=4 (4)

Best guess. If no match is found, show both PS and PCL drivers.

GetCapabilitiesID

Data type: uint32

Access type: Read-only

Capabilities ID for the provider.

HomeDirectory

Data type: string

Access type: Read-only

The root directory for the computer.

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.

LicensingDescription

Data type: string

Access type: Read-only

A brief description of the licensing mode.

LicensingName

Data type: string

Access type: Read-only

The name of the licensing mode.

LicensingType

Data type: uint32

Access type: Read-only

The licensing type for the specified server mode.

Personal Terminal Server (0)

Personal RD Session Host server.

Remote Desktop for Administration (1)

Remote Desktop for Administration.

Per Device (2)

Per Device. Valid for application servers.

Per User (3)

Per User. Valid for application servers.

Not Configured (4)

Not Configured.

LimitedUserSessions

Data type: uint32

Access type: Read/write

Indicates whether the feature to limit the number of both active and inactive sessions that are allowed on an RD Session Host server is enabled. For example, you may want to set LimitedUserSessions to guarantee license compliance for a particular application that is installed on the RD Session Host server. Or, you may want to limit the maximum number of sessions on an RD Session Host server in a load-balanced farm so that the server will not be overloaded if another server in the farm fails.

Note

The session that is used to connect to the server for administrative purposes is not affected by LimitedUserSessions.

In an RD Session Host server farm, if a user exceeds the session limit, the session will be directed to another server by RD Connection Broker load balancing. If the server is a stand-alone server, the user will not be able to connect.

Because of the session that is used to connect to the server for administrative purposes, and the timing of the enforcement of the number of sessions during the logon cycle, it is recommended that you set LimitedUserSessions to a value that is slightly lower that the physical limit for the number of sessions on a server.

The LimitedUserSessions property is only valid if the RD Session Host role service is installed.

0

The feature is disabled.

1 or greater

A value of one or greater represents the maximum number of sessions (both active and inactive) that are allowed on the RD Session Host server.

Logons

Data type: string

Access type: Read/write

Specifies whether new sessions are allowed. This setting does not affect existing settings.

0

New sessions are allowed.

1

New sessions are not allowed.

Name

Data type: string

Access type: Read-only

The name of the object.

This property is inherited from CIM_ManagedSystemElement.

NetworkFSSCatchAllWeight

Data type: uint32

Access type: Read/write

Specifies the default network fair share weight for catch-all network traffic. Valid values are 1 to 9.

Windows Server 2008 R2 and Windows Server 2008: This property is not available.

NetworkFSSLocalSystemWeight

Data type: uint32

Access type: Read/write

Specifies the default network fair share weight for a local system processes. Valid values are 1 to 9.

Windows Server 2008 R2 and Windows Server 2008: This property is not available.

NetworkFSSUserSessionWeight

Data type: uint32

Access type: Read/write

Specifies the default network fair share weight for a user session. Valid values are 1 to 9.

Windows Server 2008 R2 and Windows Server 2008: This property is not available.

PolicySourceAllowTSConnections

Data type: uint32

Access type: Read-only

Indicates whether the AllowTSConnections property is configured by the server or by group policy.

0 (0x0)

Server

1 (0x1)

Group policy

PolicySourceConfiguredLicenseServers

Data type: uint32

Access type: Read-only

Indicates whether the license servers returned by the GetSpecifiedLicenseServerList method are configured by the server or by group policy.

Windows Server 2008: This property is not available.

0 (0x0)

Server

1 (0x1)

Group policy

PolicySourceDeleteTempFolders

Data type: uint32

Access type: Read-only

Indicates whether the DeleteTempFolders property is configured by the server or by group policy.

0 (0x0)

Server

1 (0x1)

Group policy

PolicySourceDirectConnectLicenseServers

Data type: uint32

Access type: Read-only

Qualifiers: DEPRECATED

This property is not available.

Windows Server 2008: Indicates whether the DirectConnectLicenseServers property is configured by the server or by group policy.

0 (0x0)

Server

1 (0x1)

Group policy

PolicySourceDisableForcibleLogoff

Data type: uint32

Access type: Read-only

This property is not supported.

Windows Server 2008: Determines whether the DisableForcibleLogoff property is configured by the server or by group policy.

0

Server

1

Group Policy.

PolicySourceEnableAutomaticReconnection

Data type: uint32

Access type: Read-only

Indicates whether the EnableAutomaticReconnection property is configured by the server or group policy.

0 (0x0)

Server

1 (0x1)

Group policy

Windows Server 2008 R2 and Windows Server 2008: This property is not available.

PolicySourceEnableDFSS

Data type: uint32

Access type: Read-only

Indicates whether the EnableDFSS property is configured by the server or by group policy.

0 (0x0)

Server

1 (0x1)

Group policy

Windows Server 2008: This property is unavailable prior to Windows Server 2008 R2.

PolicySourceEnableRemoteDesktopMSI

Data type: uint32

Access type: Read-only

Indicates whether the EnableRemoteDesktopMSI property is configured by the server or group policy.

0 (0x0)

Server

1 (0x1)

Group policy

Windows Server 2008: This property is unavailable prior to Windows Server 2008 R2.

PolicySourceFallbackPrintDriverType

Data type: uint32

Access type: Read-only

Indicates whether the FallbackPrintDriverType property is configured by the server or by group policy.

0 (0x0)

Server

1 (0x1)

Group policy

PolicySourceHomeDirectory

Data type: uint32

Access type: Read-only

Indicates whether the HomeDirectory property is configured by the server or by group policy.

0 (0x0)

Server

1 (0x1)

Group policy

PolicySourceLicensingType

Data type: uint32

Access type: Read-only

Indicates whether the LicensingType property is configured by the server or by group policy.

0 (0x0)

Server

1 (0x1)

Group policy

PolicySourceProfilePath

Data type: uint32

Access type: Read-only

Indicates whether the ProfilePath property is configured by the server or by group policy.

0 (0x0)

Server

1 (0x1)

Group policy

PolicySourceRedirectSmartCards

Data type: uint32

Access type: Read-only

Indicates whether the RedirectSmartCards property is configured by the server or group policy.

0 (0x0)

Server

1 (0x1)

Group policy

Windows Server 2008 R2 and Windows Server 2008: This property is not available.

PolicySourceSingleSession

Data type: uint32

Access type: Read-only

Indicates whether the property SingleSession is configured by the server or by group policy.

0 (0x0)

Server

1 (0x1)

Group policy

PolicySourceTimeZoneRedirection

Data type: uint32

Access type: Read-only

Indicates whether the property TimeZoneRedirection is configured by the server or by group policy.

0 (0x0)

Server

1 (0x1)

Group policy

PolicySourceUseRDEasyPrintDriver

Data type: uint32

Access type: Read-only

Indicates whether the UseRDEasyPrintDriver property is configured by the server or group policy.

0 (0x0)

Server

1 (0x1)

Group policy

Windows Server 2008 R2 and Windows Server 2008: This property is not available.

PolicySourceUseTempFolders

Data type: uint32

Access type: Read-only

Indicates whether the UseTempFolders property is configured by the server or by group policy.

0 (0x0)

Server

1 (0x1)

Group policy

PossibleLicensingTypes

Data type: uint32

Access type: Read-only

Qualifiers: BitMap ("0", "1", "2", "4", "5"), BitValues ("Personal Terminal Server", "Remote Desktop for Administration", "Per Device", "Per User", "Not Configured")

A bitmask that specifies the licensing types that are available. This can be a combination of one or more of the following values.

1 (0x1)

Personal RD Session Host server licenses are supported.

2 (0x2)

Remote Desktop licenses are supported.

4 (0x4)

Per device licenses are supported.

8 (0x8)

Per user licenses are supported.

ProfilePath

Data type: string

Access type: Read-only

Profile path for the computer.

RedirectSmartCards

Data type: uint32

Access type: Read/write

Specifies if redirection of smart card devices is allowed in a remote session.

0 (0x0)

Smart card device redirection is not allowed.

1 (0x1)

Smart card device redirection is allowed.

Windows Server 2008 R2 and Windows Server 2008: This property is not available.

ServerName

Data type: string

Access type: Read-only

Qualifiers: key

Name of the RD Session Host server whose properties are of interest.

SessionBrokerDrainMode

Data type: uint32

Access type: Read/write

The RD Connection Broker user logon mode.

0

Allow all connections.

1

Allow reconnections, but prevent new logons until the server is restarted.

2

Allow reconnections, but prevent new logons.

SingleSession

Data type: uint32

Access type: Read-only

Specifies whether one or more Remote Desktop Services sessions are allowed per user.

False (0)

More than one session is allowed per user.

True (1)

Only one session is allowed per user.

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")

TerminalServerMode

Data type: uint32

Access type: Read-only

The RD Session Host server operating mode of the Remote Desktop Services service. This mode controls the licensing policies that are applicable as well as whether application-compatibility features are enabled.

AppServer (1)

The server operates as an application server.

RemoteAdmin (0)

The session is administered remotely.

TimeZoneRedirection

Data type: uint32

Access type: Read-only

Specifies whether the client computer can redirect its time zone settings to the Remote Desktop Services session.

0

Redirection is disabled.

1

Redirection is enabled.

UseRDEasyPrintDriver

Data type: uint32

Access type: Read/write

Specifies whether the Remote Desktop Easy Print printer driver is used first to install all client printers.

0

The RD Session Host server tries to find a suitable printer driver to install the client printer. If the RD Session Host server does not have a printer driver that matches the client printer, the server tries to use the Remote Desktop Easy Print driver to install the client printer.

1

The RD Session Host server first tries to use the Remote Desktop Easy Print printer driver to install all client printers. If for any reason the Remote Desktop Easy Print printer driver cannot be used, a printer driver on the RD Session Host server that matches the client printer is used.

Windows Server 2008 R2 and Windows Server 2008: This property is not available.

UserPermission

Data type: uint32

Access type: Read/write

Specifies if each user session has tight or relaxed security.

FALSE (0)

Security is tight.

TRUE (1)

Security is relaxed.

UseTempFolders

Data type: uint32

Access type: Read-only

Specifies whether temporary directories are created and deleted on a per-session basis.

FALSE (0)

Temporary directories are not created and deleted for each session. One is created for the first session and never deleted.

TRUE (1)

Temporary directories are created and deleted for each session.

Remarks

Win32_TerminalServiceSetting is associated to Win32_TerminalService as the Setting property of the Win32_TerminalServiceToSetting association.

Win32_TerminalSetting is associated to Win32_Terminal as the Setting property of the Win32_TerminalTerminalSetting association.

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 six.

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
None supported
Minimum supported server
Windows Server 2008
Namespace
Root\CIMv2\TerminalServices
MOF
TSCfgWmi.mof
DLL
TSCfgWmi.dll

See also

CIM_Setting

Win32_Terminal

Win32_TerminalService

Win32_TerminalServiceToSetting

Win32_TerminalTerminalSetting

CIM_Setting