Create method of the Win32_TSGatewayConnectionAuthorizationPolicy class
Creates a Remote Desktop connection authorization policy (RD CAP) by using the specified values. The new RD CAP will be inserted at the top of the RD CAP evaluation order, with an Order property value of "1".
Syntax
uint32 Create(
[in] string Name,
[in] string UserGroupNames,
[in] string ComputerGroupNames,
[in] boolean SmartCard,
[in] boolean Password,
[in] boolean SecureId,
[in] boolean Enabled,
[in] uint32 DeviceRedirectionType,
[in] boolean DiskDrivesDisabled,
[in] boolean PrintersDisabled,
[in] boolean SerialPortsDisabled,
[in] boolean ClipboardDisabled,
[in] boolean PlugAndPlayDevicesDisabled,
[in] uint32 IdleTimeout,
[in] uint32 SessionTimeout,
[in] uint32 SessionTimeoutAction,
[in] boolean AllowOnlySDRServers,
[in] boolean CookieAuthentication
);
Parameters
-
Name [in]
-
Name of the RD CAP. The name must be 64 characters or less, unique (case is ignored), and cannot contain the following reserved characters:
<> : ; " / \ | ? * [TAB]
-
UserGroupNames [in]
-
List of user group names, separated by semicolons, for the new RD CAP.
-
ComputerGroupNames [in]
-
List of computer group names, separated by semicolons, for the new RD CAP.
-
SmartCard [in]
-
Specifies whether smart cards can be used to authenticate with the RD Gateway server.
-
Password [in]
-
Specifies whether passwords can be used to authenticate with the RD Gateway server.
-
SecureId [in]
-
This parameter is reserved for future use.
-
Enabled [in]
-
Specifies whether this RD CAP is enabled.
-
DeviceRedirectionType [in]
-
Specifies which device types will be redirected.
-
0
-
All devices will be redirected.
-
1
-
No devices will be redirected.
-
2
-
Specified devices will not be redirected. The DiskDrivesDisabled, PrintersDisabled, SerialPortsDisabled, ClipboardDisabled, and PlugAndPlayDevicesDisabled parameters control which devices will not be redirected.
DiskDrivesDisabled [in]
Specifies whether to disable disk drive redirection if the DeviceRedirectionType parameter is "2".
PrintersDisabled [in]
Specifies whether to disable printer redirection if the DeviceRedirectionType parameter is "2".
SerialPortsDisabled [in]
Specifies whether to disable serial port redirection if the DeviceRedirectionType parameter is "2".
ClipboardDisabled [in]
Specifies whether to disable clipboard redirection if the DeviceRedirectionType parameter is "2".
PlugAndPlayDevicesDisabled [in]
Specifies whether to disable redirection of Plug and Play devices if the DeviceRedirectionType parameter is "2".
IdleTimeout [in]
Idle timeout value in minutes
SessionTimeout [in]
Session timeout value in minutes
SessionTimeoutAction [in]
Session timeout action in minutes
AllowOnlySDRServers [in]
Whether connections allowed only to SDR TS servers
CookieAuthentication [in]
Indicates whether cookie authentication can be used to connect to TS Gateway server
Return value
If the method succeeds, it returns zero. If the method is unsuccessful, it returns a nonzero value. For a list of error codes, see Remote Desktop Services WMI Provider Error Codes.
Remarks
You must be a member of the Administrators group to call this method.
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 |
|
DLL |
|