Click to Rate and Give Feedback
IADsTSUserEx Interface

The property methods of the IADsTSUserEx interface can be used to examine and configure Remote Desktop Services user properties. Properties include logon, TerminalServicesHomeDirectory, remote control, session, and environment properties of the ADsTSUserEx class.

Before calling the methods of this interface, you must call the IADs::GetInfo method or the IADs::GetInfoEx method to load the property values of the ADSI object from the underlying directory store into the property cache. Call IADs::GetInfo to refresh all the property values for the class; call IADs::GetInfoEx to refresh the values of selected properties in the property cache.

After calling the methods of this interface, you must call the IADs::SetInfo method to save the property value changes in the persistent store of the underlying directory store.

For more information, see The ADSI Attribute Cache and the reference section for the ADSI Interfaces. For a general discussion on property methods, see Interface Property Methods.

The following table lists the property methods of the IADsTSUserEx interface in vtable order.

Methods

The IADsTSUserEx interface inherits the methods of the IDispatch interface.

In addition, IADsTSUserEx defines the following methods.

MethodDescription

get_TerminalServicesProfilePath

Retrieves the roaming or mandatory profile path to be used when the user logs on to the RD Session Host server.

put_TerminalServicesProfilePath

Sets the roaming or mandatory profile path to be used when the user logs on to the RD Session Host server.

get_TerminalServicesHomeDirectory

Retrieves the root directory for the user.

put_TerminalServicesHomeDirectory

Sets the root directory for the user.

get_TerminalServicesHomeDrive

Retrieves the root drive for the user.

put_TerminalServicesHomeDrive

Sets the root drive for the user.

get_AllowLogon

Indicates whether the user is allowed to log on to the RD Session Host server.

put_AllowLogon

Sets whether the user is allowed to log on to the RD Session Host server.

get_EnableRemoteControl

Indicates whether remote observation or remote control of the user's Remote Desktop Services session is allowed.

put_EnableRemoteControl

Sets whether remote observation or remote control of the user's Remote Desktop Services session is allowed.

get_MaxDisconnectionTime

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

put_MaxDisconnectionTime

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

get_MaxConnectionTime

Retrieves the maximum duration of the Remote Desktop Services session, in minutes.

put_MaxConnectionTime

Sets the maximum duration of the Remote Desktop Services session, in minutes.

get_MaxIdleTime

Retrieves the maximum amount of time that the Remote Desktop Services session can remain idle, in minutes.

put_MaxIdleTime

Sets the maximum amount of time that the Remote Desktop Services session can remain idle, in minutes.

get_ReconnectionAction

This method is not supported.

put_ReconnectionAction

This method is not supported.

get_BrokenConnectionAction

Indicates the action to be taken when a Remote Desktop Services session limit is reached.

put_BrokenConnectionAction

Sets the action to be taken when a Remote Desktop Services session limit is reached.

get_ConnectClientDrivesAtLogon

This method is not supported.

put_ConnectClientDrivesAtLogon

This method is not supported.

get_ConnectClientPrintersAtLogon

Indicates whether to reconnect to mapped client printers at logon.

put_ConnectClientPrintersAtLogon

Sets whether to reconnect to mapped client printers at logon.

get_DefaultToMainPrinter

Indicates whether to print automatically to the client's default printer.

put_DefaultToMainPrinter

Sets whether to print automatically to the client's default printer.

get_TerminalServicesWorkDirectory

Retrieves the working directory path for the user.

put_TerminalServicesWorkDirectory

Sets the working directory path for the user.

get_TerminalServicesInitialProgram

Retrieves 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.

put_TerminalServicesInitialProgram

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.

 

Properties

The IADsTSUserEx interface defines the following properties. The preceding table includes access methods for these properties.

PropertyAccess typeDescription

AllowLogon

Read/write

A value that specifies whether the user is allowed to log on to the RD Session Host server. The value is one if logon is allowed, and zero if logon is not allowed.

BrokenConnectionAction

Read/write

A value that specifies the action to be taken when a Remote Desktop Services session limit is reached. The value is one if the client session should be terminated, and zero if the client session should be disconnected.

ConnectClientDrivesAtLogon

Read/write

This property is not supported by Remote Desktop Services.

ConnectClientPrintersAtLogon

Read/write

A value that specifies whether to reconnect to mapped client printers at logon. The value is one if reconnection is enabled, and zero if reconnection is disabled.

DefaultToMainPrinter

Read/write

A value that specifies whether to print automatically to the client's default printer. The value is one if printing to the client's default printer is enabled, and zero if it is disabled.

EnableRemoteControl

Read/write

A value that specifies whether to allow remote observation or remote control of the user's Remote Desktop Services session. For a description of these values, see the RemoteControl method of the Win32_TSRemoteControlSetting WMI class.

MaxConnectionTime

Read/write

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.

MaxDisconnectionTime

Read/write

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

MaxIdleTime

Read/write

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.

ReconnectionAction

Read/write

This property is not supported by Remote Desktop Services.

TerminalServicesHomeDirectory

Read/write

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.

TerminalServicesHomeDrive

Read/write

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.

TerminalServicesInitialProgram

Read/write

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

Read/write

The roaming or mandatory profile path to be used when the user logs on to the RD Session Host server.

TerminalServicesWorkDirectory

Read/write

The working directory path for the user.

 

Requirements

Minimum supported clientWindows XP
Minimum supported serverWindows 2000 Server
HeaderTsuserex.h (include Tsuserex.h or Tsuserex_i.c)
Type LibraryTsuserex.tlb
DLLTsuserex.dll

See Also

Interface Property Methods
Active Directory Service Interfaces Scripting
ADSI Interfaces
IADs::GetInfo
IADs::GetInfoEx
IADs::SetInfo

Send comments about this topic to Microsoft

Build date: 10/19/2009

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker