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")]class Win32_TerminalServiceSetting : CIM_Setting
{
string Caption;
string Description;
string SettingID;
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 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. Windows Server 2008, Windows Server 2003, and Windows XP: This method is not available. |
| 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. |
| EmptySpecifiedLicenseServerList |
Removes all license servers from the list of specified license servers. Windows Server 2008, Windows Server 2003, and Windows XP: This method is not available. |
| 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. Windows Server 2008, Windows Server 2003, and Windows XP: This method is not available. |
| GetSpecifiedLicenseServerList |
Retrieves the list of specified license servers. Windows Server 2008, Windows Server 2003, and Windows XP: This method is not available. |
| GetTSLanaIds |
Gets the IDs and descriptions of Remote Desktop Services network adapters. Windows Server 2003 and Windows XP: This method is not available. |
| GetTStoLSConnectivityStatus |
Determines the connectivity status between Remote Desktop Services and a license server. Windows Server 2008, Windows Server 2003, and Windows XP: This method is not available. |
| GetWinstationDriverNames |
Retrieves a list of Winstation driver names. |
| 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. |
| RemoveLSFromSpecifiedLicenseServerList |
Removes the given license server from the list of specified license servers. Windows Server 2008, Windows Server 2003, and Windows XP: This method is not available. |
| 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, UseTempFolders, or Help. Help is not supported for Windows Server 2003 with SP1 and later and Windows XP with SP2 and later. Windows Server 2003, Windows XP with SP1, and Windows XP: Help is supported. |
| SetPrimaryLicenseServer |
Sets the given license server as the first entry in the list of specified license servers. Windows Server 2008, Windows Server 2003, and Windows XP: This method is not available. |
| SetProfilePath |
Sets the ProfilePath property. |
| SetSingleSession |
Sets the SingleSession property. |
| SetSpecifiedLicenseServerList |
Updates the list of specified license servers, replacing any existing specified license servers. Windows Server 2008, Windows Server 2003, and Windows XP: This method is not available. |
| 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 has these 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
- Qualifiers: DEPRECATED
This property is not available.
Windows Server 2008 and Windows Server 2003: 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.
- 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.
Windows Server 2008 and Windows Server 2003: This property is not available.
Value Meaning - 0 (0x0)
Automatic reconnection is disabled.
- 1 (0x1)
Automatic reconnection is enabled.
- 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.
Value Meaning - 0
DFSS is disabled.
- 1
DFSS is enabled.
- EnableDiskFSS
-
- Data type: uint32
- Access type: Read/write
Specifies if disk fair share scheduling is enabled.
Windows Server 2008 and Windows Server 2003: This property is not available.
Value Meaning - 0 (0x0)
Disk fair share scheduling is disabled.
- 1 (0x1)
Disk fair share scheduling is enabled.
- EnableNetworkFSS
-
- Data type: uint32
- Access type: Read/write
Specifies if network fair share scheduling is enabled.
Windows Server 2008 and Windows Server 2003: This property is not available.
Value Meaning - 0 (0x0)
Network fair share scheduling is disabled.
- 1 (0x1)
Network fair share scheduling is enabled.
- EnableRemoteDesktopMSI
-
- Data type: uint32
- Access type: Read/write
Indicates whether the Remote Desktop MSI is enabled or disabled.
Value Meaning - 0 (0x0)
Disabled
- 1 (0x1)
Enabled
- 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.
- 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.
- 5
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.
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.
- 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 and Windows Server 2003: 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 and Windows Server 2003: 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 and Windows Server 2003: 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.
Windows Server 2003 and Windows XP: This property is not available.
Value Meaning - 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, Windows Vista, 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
- Qualifiers: DEPRECATED
This property is not available.
Windows Server 2008: Indicates whether the DirectConnectLicenseServers property is configured by the server or by group policy.
Windows Server 2003: This property is not available.
Value Meaning - 0 (0x0)
Server
- 1 (0x1)
Group policy
- PolicySourceEnableAutomaticReconnection
-
- Data type: uint32
- Access type: Read-only
Indicates whether the EnableAutomaticReconnection property is configured by the server or group policy.
Windows Server 2008 and Windows Server 2003: This property is not available.
Value Meaning - 0 (0x0)
Server
- 1 (0x1)
Group policy
- PolicySourceEnableDFSS
-
- Data type: uint32
- Access type: Read-only
Indicates whether the EnableDFSS property is configured by the server or by group policy.
Value Meaning - 0 (0x0)
Server
- 1 (0x1)
Group policy
- PolicySourceEnableRemoteDesktopMSI
-
- Data type: uint32
- Access type: Read-only
Indicates whether the EnableRemoteDesktopMSI property is configured by the server or group policy.
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
- PolicySourceRedirectSmartCards
-
- Data type: uint32
- Access type: Read-only
Indicates whether the RedirectSmartCards property is configured by the server or group policy.
Windows Server 2008 and Windows Server 2003: 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
- PolicySourceUseRDEasyPrintDriver
-
- Data type: uint32
- Access type: Read-only
Indicates whether the UseRDEasyPrintDriver property is configured by the server or group policy.
Windows Server 2008 and Windows Server 2003: 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 specifies the licensing types that are available. This can be a combination of one or more of the following values.
Windows Server 2003 and Windows XP: This property is not available.
Value Meaning - 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.
Windows Server 2008 and Windows Server 2003: This property is not available.
Value Meaning - 0 (0x0)
Smart card device redirection is not allowed.
- 1 (0x1)
Smart card device redirection is allowed.
- 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.
- 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.
Windows Server 2008 and Windows Server 2003: This property is not available.
Value Meaning - 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.
- UserPermission
-
- Data type: uint32
- Access type: Read/write
Specifies if each user session has tight or relaxed security.
Value Meaning - 0
Security is tight.
- 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.
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 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 | None supported |
|---|---|
|
Minimum supported server | Windows Server 2003 |
|
Namespace |
\root\CIMV2\TerminalServices on Windows Server 2008, \root\CIMV2 on Windows Server 2003 |
|
MOF |
|
|
DLL |
|
See also
- Win32_Terminal
- Win32_TerminalService
- Win32_TerminalServiceToSetting
- Win32_TerminalTerminalSetting
- CIM_Setting
