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

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.

ValueMeaning
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".

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

Minimum supported client

None supported

Minimum supported server

Windows Server 2008

Namespace

\root\CIMV2\TerminalServices

MOF

TSGateway.mof

See also

Win32_TSGatewayConnectionAuthorizationPolicy

 

 

Show:
© 2014 Microsoft