The
SetAllowTSConnections method sets the AllowTSConnections property for the class.
Syntax
uint32 SetAllowTSConnections(
[in] uint32 AllowTSConnections,
[in] uint32 ModifyFirewallException
);
Parameters
- AllowTSConnections [in]
-
Flag enabling or disabling the AllowTSConnections property which allows or denies new Remote Desktop Services connections.
| Value | Meaning |
- 0
| Disables the property.
|
- 1
| Enables the property.
|
- ModifyFirewallException [in]
-
Enables or disables the firewall exception for Remote Desktop.
Windows Server 2008 and Windows Vista with SP1: This parameter is supported.
Windows Vista, Windows Server 2003, Windows XP, and Windows 2000: This parameter is not supported.
| Value | Meaning |
- 0
| Disables the firewall exception for Remote Desktop.
|
- 1
| Enables the firewall exception for Remote Desktop.
|
Return Value
Returns Success on success; otherwise, returns a WMI error code. Refer to
Remote Desktop Services WMI Provider Error Codes for a list of these values. The method returns an error if the setting is under group policy control.
Remarks
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_TerminalServiceSetting
Send comments about this topic to Microsoft
Build date: 10/19/2009