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")]class Win32_TerminalServiceSetting : CIM_Setting
{
uint32 ActiveDesktop;
uint32 AllowTSConnections;
string Caption;
uint32 DeleteTempFolders;
string Description;
string DirectConnectLicenseServers;
uint32 DisableForcibleLogoff;
uint32 FallbackPrintDriverType;
uint32 GetCapabilitiesID;
uint32 Help;
string HomeDirectory;
string LicensingDescription;
string LicensingName;
uint32 LicensingType;
uint32 LimitedUserSessions;
string Logons;
uint32 PolicySourceAllowTSConnections;
uint32 PolicySourceDeleteTempFolders;
uint32 PolicySourceDirectConnectLicenseServers;
uint32 PolicySourceDisableForcibleLogoff;
uint32 PolicySourceFallbackPrintDriverType;
uint32 PolicySourceHomeDirectory;
uint32 PolicySourceLicensingType;
uint32 PolicySourceProfilePath;
uint32 PolicySourceSingleSession;
uint32 PolicySourceTimeZoneRedirection;
uint32 PolicySourceUseTempFolders;
uint32 PossibleLicensingTypes;
string ProfilePath;
string ServerName;
uint32 SessionBrokerDrainMode;
string SettingID;
uint32 SingleSession;
uint32 TerminalServerMode;
uint32 TimeZoneRedirection;
uint32 UserPermission;
uint32 UseTempFolders;
};
Methods
The Win32_TerminalServiceSetting class defines the following methods.
| Method | Description |
AddDirectConnectLicenseServer |
Configures a new license server in the enterprise.
|
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. Windows Server 2003 and Windows XP: This method is not available.
|
DeleteDirectConnectLicenseServer |
Deletes the specified license server from the enterprise.
|
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.
|
GetWinstationDriverNames |
Retrieves a list of Winstation driver names.
|
GetTSLanaIds |
Gets the IDs and descriptions of Remote Desktop Services network adapters.
Windows Server 2003 and Windows XP: This method is not available.
|
PingLicenseServer |
Pings the license server to determine whether it is a valid license server. Windows Server 2003 and Windows XP: This method is not available.
|
SetDisableForcibleLogoff |
Sets the DisableForcibleLogoff property.
|
SetAllowTSConnections |
Sets the AllowTSConnections property.
|
SetFallbackPrintDriverType |
Sets the FallbackPrintDriverType property.
|
SetHomeDirectory |
Sets the HomeDirectory property.
|
SetPolicyPropertyName |
Sets one of the following properties: DeleteTempFolders,
UseTempFolders, or Help. Windows Server 2003 with SP1, Windows XP with SP2, and later: Help is
not supported. Help is supported only in Windows Server 2003,
Windows XP with SP1, and Windows XP.
|
SetProfilePath |
Sets the ProfilePath property.
|
SetSingleSession |
Sets the SingleSession property.
|
SetTimeZoneRedirection |
Sets the TimeZoneRedirection property.
|
UpdateDirectConnectLicenseServer |
Updates the list of discovery license servers. Windows Server 2003 and Windows XP: This method is not available.
|
Properties
The Win32_TerminalServiceSetting class defines the following properties.
- ActiveDesktop
-
- Data type: uint32
- Access type: Read/write
Specifies whether Active Desktop is allowed in each user session.
| Value | Meaning |
- 0
| Active Desktop is not allowed in each user session.
|
- 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.
| Value | Meaning |
- 0
| New connections are not allowed.
|
- 1
| New connections are allowed.
|
- 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.
- DeleteTempFolders
-
- Data type: uint32
- Access type: Read-only
Specifies whether temporary directories are deleted on exit.
| Value | Meaning |
- 0
| Deletion of temporary directories is disabled.
|
- 1
| Deletion of temporary directories is enabled.
|
- Description
-
- Data type: string
- Access type: Read-only
Description of the CIM_Setting object. This property
is inherited from CIM_Setting.
- DirectConnectLicenseServers
-
- Data type: string
- Access type: Read-only
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.
Windows Server 2008 and Windows Vista: This property is not supported.
| Value | Meaning |
- 0
| Administrator can be forcibly logged off.
|
- 1
| Administrator cannot be forcibly logged off.
|
- FallbackPrintDriverType
-
- Data type: uint32
- Access type: Read-only
Specifies which printer driver to fallback to.
Windows Server 2003 and Windows XP: This property is not supported. Note that support for this property was introduced in Windows Server 2003 with SP1.
| Value | Meaning |
- 0
| No fallback drivers.
|
- 1
| Best guess.
|
- 2
| Best guess. If no match is found, fallback to Hewlett-Packard Printer Control Language (PCL).
|
- 3
| Best guess. If no match is found, fallback to Postscript (PS).
|
- 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.
Windows Server 2003 and Windows XP: This property is not available.
- Help
-
- Data type: uint32
- Access type: Read-only
Specifies whether Windows XP is enabled.
Windows Server 2003 with SP1, Windows XP with SP2, and later: Help is
not supported.
Help is supported only in Windows Server 2003,
Windows XP with SP1, and Windows XP.
| Value | Meaning |
- 0
| Help is disabled.
|
- 1
| Help is enabled.
|
- HomeDirectory
-
- Data type: string
- Access type: Read-only
The root directory for the computer.
- 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.
| Value | Meaning |
- 0
| Personal RD Session Host server.
|
- 1
| Remote Desktop for Administration.
|
- 2
| Per Device. Valid for application servers.
|
- 4
| Per User. Valid for application servers.
|
- 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.
Windows Server 2003 and Windows XP: This property is not available.
| Value | Meaning |
- 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.
| Value | Meaning |
- 0
| New sessions are allowed.
|
- 1
| New sessions are not allowed.
|
- PolicySourceAllowTSConnections
-
- Data type: uint32
- Access type: Read-only
Indicates whether the AllowTSConnections property is configured by the
server or by group policy.
Windows Server 2003 and Windows XP: This property is not available.
| Value | Meaning |
- 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.
Windows Server 2003 and Windows XP: This property is not available.
| Value | Meaning |
- 0 (0x0)
| Server
|
- 1 (0x1)
| Group policy
|
- PolicySourceDirectConnectLicenseServers
-
- Data type: uint32
- Access type: Read-only
Indicates whether the DirectConnectLicenseServers property is configured by
the server or by group policy.
Windows Server 2003 and Windows XP: This property is not available.
| Value | Meaning |
- 0 (0x0)
| Server
|
- 1 (0x1)
| Group policy
|
- PolicySourceDisableForcibleLogoff
-
- Data type: uint32
- Access type: Read-only
Indicates whether the DisableForcibleLogoff property is configured by
the server or by group policy.
Windows Server 2003 and Windows XP: This property is not available.
| Value | Meaning |
- 0 (0x0)
| Server
|
- 1 (0x1)
| Group policy
|
- PolicySourceFallbackPrintDriverType
-
- Data type: uint32
- Access type: Read-only
Indicates whether the FallbackPrintDriverType property is configured by the
server or by group policy.
Windows Server 2003 and Windows XP: This property is not available.
| Value | Meaning |
- 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.
Windows Server 2003 and Windows XP: This property is not available.
| Value | Meaning |
- 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.
Windows Server 2003 and Windows XP: This property is not available.
| Value | Meaning |
- 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.
Windows Server 2003 and Windows XP: This property is not available.
| Value | Meaning |
- 0 (0x0)
| Server
|
- 1 (0x1)
| Group policy
|
- PolicySourceSingleSession
-
- Data type: uint32
- Access type: Read-only
Indicates whether the property SingleSession is configured by the server or
by group policy.
Windows Server 2003 and Windows XP: This property is not available.
| Value | Meaning |
- 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.
Windows Server 2003 and Windows XP: This property is not available.
| Value | Meaning |
- 0 (0x0)
| Server
|
- 1 (0x1)
| Group policy
|
- PolicySourceUseTempFolders
-
- Data type: uint32
- Access type: Read-only
Indicates whether the UseTempFolders property is configured by the server or
by group policy.
Windows Server 2003 and Windows XP: This property is not available.
| Value | Meaning |
- 0 (0x0)
| Server
|
- 1 (0x1)
| Group policy
|
- PossibleLicensingTypes
-
- Data type: uint32
- Access type: Read-only
A bitmask that identifies the licensing type.
Windows Server 2003 and Windows XP: This property is not available.
| Value | Meaning |
- 1 (0x1)
| Licensed as personal RD Session Host server.
|
- 2 (0x2)
| Licensed as remote desktop for administration.
|
- 4 (0x4)
| Licensed per device.
|
- 8 (0x8)
| Licensed per user.
|
- ProfilePath
-
- Data type: string
- Access type: Read-only
Profile path for the computer.
- 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.
Windows Server 2003 and Windows XP: This property is not available.
| Value | Meaning |
- 0
| Allow all connections.
|
- 1
| Allow reconnections, but prevent new logons until the server is restarted.
|
- 2
| Allow reconnections, but prevent new logons.
|
- 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.
- SingleSession
-
- Data type: uint32
- Access type: Read-only
Specifies whether one or more Remote Desktop Services sessions are allowed per user.
| Value | Meaning |
- 0
| More than one session is allowed per user.
|
- 1
| Only one session is allowed per user.
|
- 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.
| Value | Meaning |
- Application Server
- 1
| The server operates as an application server.
|
- Remote Administration
- 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.
| Value | Meaning |
- 0
| Redirection is disabled.
|
- 1
| Redirection is enabled.
|
- UserPermission
-
- Data type: uint32
- Access type: Read/write
Application compatibility bit.
| Value | Meaning |
- 0
| The bit is not set.
|
- 1
| The bit is set.
|
- UseTempFolders
-
- Data type: uint32
- Access type: Read-only
Specifies whether temporary directories are created and deleted on a per-session basis.
| Value | Meaning |
- 0
| Temporary directories are not created and deleted for each session. One is created for the first session
and never deleted.
|
- 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 Windows 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 |
| MOF | Tscfgwmi.mof |
| DLL | Tscfgwmi.dll |
| Namespace | \root\CIMV2\TerminalServices on Windows Vista and Windows Server 2008\root\CIMV2 on Windows XP and Windows Server 2003 |
See Also
- Win32_Terminal
- Win32_TerminalService
- Win32_TerminalServiceToSetting
- Win32_TerminalTerminalSetting
- CIM_Setting
Send comments about this topic to Microsoft
Build date: 10/19/2009