IADsTSUserEx

The properties of the IADsTSUserEx interface can be used to examine and configure Remote Desktop Services user properties.

In order to minimize network traffic, it is recommended to call IADs::GetInfo or IADs::GetInfoEx to load the property values into the property cache before calling methods of this interface.

After calling the methods of this interface, call the IADs::SetInfo method to save the changes to the directory.

Inheritance: IDispatch

Properties

  • Property

  • Description

  • AllowLogon

  • Gets or sets a value that indicates whether the user is allowed to log on to the RD Session Host server.

  • BrokenConnectionAction

  • Gets or sets a value that specifies which action to take when a Remote Desktop Services session limit is reached.

  • ConnectClientDrivesAtLogon

  • Gets or sets a value that specifies whether to reconnect mapped client drives when a Remote Desktop Services session is started.

  • ConnectClientPrintersAtLogon

  • Gets or sets a value that specifies whether to reconnect to mapped client printers at logon.

  • DefaultToMainPrinter

  • Gets or sets a value that specifies whether to automatically print to the client's default printer.

  • EnableRemoteControl

  • Gets or sets a value that specifies whether to allow remote observation or remote control of the user's Remote Desktop Services session.

  • MaxConnectionTime

  • Gets or sets the maximum duration of the Remote Desktop Services session, in minutes.

  • MaxDisconnectionTime

  • Gets or sets the maximum amount of time that a disconnected Remote Desktop Services session remains active on the RD Session Host server, in minutes.

  • MaxIdleTime

  • Gets or sets the maximum amount of time that the Remote Desktop Services session can remain idle, in minutes.

  • ReconnectionAction

  • Gets or sets a value that specifies whether reconnection to a disconnected Remote Desktop Services session is allowed.

  • TerminalServicesHomeDirectory

  • Gets or sets the root directory for the user.

  • TerminalServicesHomeDrive

  • Gets or sets the root drive for the user.

  • TerminalServicesInitialProgram

  • Gets or sets the path and file name of the application that the user wants to start automatically when the user logs on to the RD Session Host server.

  • TerminalServicesProfilePath

  • Gets or sets the roaming or mandatory profile path to be used when the user logs on to the Remote Desktop Session Host (RD Session Host) server.

  • TerminalServicesWorkDirectory

  • Gets or sets the working directory path for the user.

Details

AllowLogon

Gets or sets a value that indicates whether the user is allowed to log on to the RD Session Host server. The value is 1 if logon is allowed, and 0 if logon is not allowed.

  • Type:
  • int
  • Access:
  • Read/Write

BrokenConnectionAction

Gets or sets a value that specifies which action to take when a Remote Desktop Services session limit is reached. The value is 1 if the client session should be terminated, and 0 if the client session should be disconnected.

  • Type:
  • int
  • Access:
  • Read/Write

ConnectClientDrivesAtLogon

Gets or sets a value that specifies whether to reconnect mapped client drives when a Remote Desktop Services session is started. The value is 1 if reconnection is enabled, and 0 if reconnection is disabled.

  • Type:
  • int
  • Access:
  • Read/Write

ConnectClientPrintersAtLogon

Gets or sets a value that specifies whether to reconnect to mapped client printers at logon. The value is 1 if reconnection is enabled, and 0 if reconnection is disabled.

  • Type:
  • int
  • Access:
  • Read/Write

DefaultToMainPrinter

Gets or sets a value that specifies whether to automatically print to the client's default printer. The value is 1 if printing to the client's default printer is enabled, and 0 if it is disabled.

  • Type:
  • int
  • Access:
  • Read/Write

EnableRemoteControl

Gets or sets a value that specifies whether to allow remote observation or remote control of the user's Remote Desktop Services session.

  • Type:
  • int
  • Access:
  • Read/Write

Remarks

The value specifies whether the session will only be viewed by the remote user, or viewed and controlled through a keyboard and a mouse. The following values are supported:

  • 0 (Disable) – remote control is disabled.
  • 1 (EnableInputNotify) – the remotely controlling user has full control of this user's session, with the user's permission.
  • 2 (EnableInputNoNotify) – the remotely controlling user has full control of this user's session. The user's permission is not required.
  • 3 (EnableNoInputNotify) – the remotely controlling user can view the session, with the user's permission. The remote user cannot actively control the session.
  • 4 (EnableNoInputNoNotify) – the remotely controlling user can view the session, but not actively control the session. The user's permission is not required.

MaxConnectionTime

Gets or sets the maximum duration of the Remote Desktop Services session, in minutes. After the specified number of minutes have elapsed, the session can be disconnected or terminated.

  • Type:
  • int
  • Access:
  • Read/Write

MaxDisconnectionTime

Gets or sets the maximum amount of time that a disconnected Remote Desktop Services session remains active on the RD Session Host server, in minutes. After the specified number of minutes have elapsed, the session is terminated.

  • Type:
  • int
  • Access:
  • Read/Write

MaxIdleTime

Gets or sets the maximum amount of time that the Remote Desktop Services session can remain idle, in minutes. After the specified number of minutes has elapsed, the session can be disconnected or terminated.

  • Type:
  • int
  • Access:
  • Read/Write

ReconnectionAction

Gets or sets a value that specifies whether reconnection to a disconnected Remote Desktop Services session is allowed.

  • Type:
  • int
  • Access:
  • Read/Write

Remarks

This property is not used by Remote Desktop Services.


TerminalServicesHomeDirectory

Gets or sets the root directory for the user. Each user on an RD Session Host server has a unique root directory. This ensures that application information is stored separately for each user in a multiuser environment.

  • Type:
  • string
  • Access:
  • Read/Write

Remarks

To set a root directory on the local computer, specify a local path (e.g. C:\Path). To set a root directory in a network environment, you must first set the TerminalServicesHomeDrive property, and then set this property to a UNC path.


TerminalServicesHomeDrive

Gets or sets the root drive for the user. In a network environment, this property is a string that contains a drive specification (a drive letter followed by a colon) to which the UNC path specified in the TerminalServicesHomeDirectory property is mapped.

  • Type:
  • string
  • Access:
  • Read/Write

Remarks

To set a root directory in a network environment, you must first set this property and then set the TerminalServicesHomeDirectory property.


TerminalServicesInitialProgram

Gets or sets the path and file name of the application that the user wants to start automatically when the user logs on to the RD Session Host server.

  • Type:
  • string
  • Access:
  • Read/Write

Remarks

To set an initial application to start when the user logs on, you must first set this property and then set the TerminalServicesWorkDirectory property. If you set only the TerminalServicesInitialProgram property, the application starts in the user's session in the default user directory.


TerminalServicesProfilePath

Gets or sets the roaming or mandatory profile path to be used when the user logs on to the Remote Desktop Session Host (RD Session Host) server.

  • Type:
  • string
  • Access:
  • Read/Write

Remarks

  • The profile path is in the following network path format: \\ServerName\ProfilesFolderName\UserName
  • A Remote Desktop Services profile path is used only for logging on to an RD Session Host server.

TerminalServicesWorkDirectory

Gets or sets the working directory path for the user.

  • Type:
  • string
  • Access:
  • Read/Write

Remarks

To set an initial application to start when the user logs on to the Remote Desktop Session Host (RD Session Host) server, you must first set the TerminalServicesInitialProgram property, and then set this property.


Requirements

Minimum required version: 2009.1

See also