Managed Terminal Services::GetUserSettings

The method returns all Terminal Services-related settings of the specified user.

Arguments

Input Arguments Required Description

<user>

Yes

The user name for which Terminal Services configuration settings are to be retrieved. If this is a SAM account name, the configuration is retrieved from the specified server, and server parameter is required. If this is a distinguished name (DN) or an LDAP(Lightweight Directory Access Protocol) path, the configuration is retrieved from Active Directory, and the preferredDomainController parameter is required.

<server>

No

The name of the terminal server from which settings are to be retrieved. This parameter is required if user is specified as a SAM account name. This parameter is ignored if user is specified as a DN or LDAP path. Note: In some configurations an error will occur if this parameter is specified as a fully-qualified name. Use the NetBIOS name instead to avoid the issue.

<preferredDomainController>

No

The name of the preferred domain controller from which Active Directory settings are to be retrieved. This parameter is required if user is specified as a DN or LDAP path. This parameter is ignored if user is specified as a SAM account name. Note: In some configurations an error will occur if this parameter is specified as a fully-qualified name. Use the NetBIOS name instead to avoid the issue.

This method returns the same data as the GetUserConfiguration method of the Terminal Services provider, namely the following:

Output Arguments Output Arguments

properties/property[@name='InitialProgram']

properties/property[@name='WorkingDirectory']

properties/property[@name='fAllowLogonTerminalServer']

properties/property[@name='TimeoutSettingsConnections']

properties/property[@name='TimeoutSettingsDisconnections']

properties/property[@name='TimeoutSettingsIdle']

properties/property[@name='fDeviceClientDrives']

properties/property[@name='fDeviceClientPrinters']

properties/property[@name='fDeviceClientDefaultPrinter']

properties/property[@name='BrokenTimeoutSettings']

properties/property[@name='ReconnectSettings']

properties/property[@name='ModemCallbackSettings']

properties/property[@name='ModemCallbackPhoneNumber']

properties/property[@name='ShadowingSettings']

properties/property[@name='TerminalServerProfilePath']

properties/property[@name='TerminalServerHomeDir']

properties/property[@name='TerminalServerHomeDirDrive']

properties/property[@name='fTerminalServerRemoteHomeDir']

Refer to the Terminal Services provider specification or to WTS_CONFIG_CLASS on MSDN for more information.

Remarks

Security

If the inputs specify an Active Directory user, the caller must be a DomainAdmin, OrgCreator, or OrgAdmin. OrgCreators and OrgAdmins are allowed to retrieve settings only for users in their organizations. In addition, users are allowed to call this method to retrieve their own settings.

If the inputs specify a local machine user, the caller must be a domain user who is an administrator of the specified server.

Sample Code

Example XML Request

<request> 
  <procedure> 
    <execute namespace="Managed Terminal Services" 
             procedure="GetUserSettings"> 
      <executeData> 
        <user>CN=Mary Customer,OU=Hosting,DC=Fabrikam,DC=com</user> 
        <preferredDomainController>dc1</preferredDomainController> 
      </executeData> 
    </execute> 
  </procedure> 
</request> 

Example XML Response

<response> 
  <executeData> 
    <user>CN=Mary Customer,OU=Hosting,DC=Fabrikam,DC=com</user> 
    <preferredDomainController>dc1</preferredDomainController> 
    <properties> 
      <property name="InitialProgram">HelloWorld.exe</property> 
      <property name="WorkingDirectory">c:\simplePrograms</property> 
      <property name="fAllowLogonTerminalServer">true</property> 
      <property name="TimeoutSettingsConnections">0</property> 
      <property name="TimeoutSettingsDisconnections">0</property> 
      <property name="TimeoutSettingsIdle">0</property> 
      <property name="fDeviceClientDrives">false</property> 
      <property name="fDeviceClientPrinters">false</property> 
      <property name="fDeviceClientDefaultPrinter">false</property> 
      <property name="BrokenTimeoutSettings">1</property> 
      <property name="ReconnectSettings">0</property> 
      <property name="ModemCallbackSettings">0</property> 
      <property name="ModemCallbackPhoneNumber"></property> 
      <property name="ShadowingSettings">0</property> 
      <property name="TerminalServerProfilePath">\\DC\TSProfiles</property> 
      <property name="TerminalServerHomeDir">\TSUsers</property> 
      <property name="TerminalServerHomeDirDrive">c:</property> 
      <property name="fTerminalServerRemoteHomeDir">false</property> 
    </properties> 
  </executeData> 
</response> 

Applies To

Terminal Services Namespace

See also

Tasks

Managed Terminal Services::SetUserSettings