You can also use ADSI and the TSUserEX library that ships with W2k and w2k3.
 
Docs and examples are here:
 
 
Paul
 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steve Patrick
Sent: Wednesday, June 02, 2004 9:52 AM
To: [EMAIL PROTECTED]
Subject: Re: [ActiveDir] Terminal Server profile path in ADSIEDIT?

The terminal server profile is stored as part of the userParameters blob. This attribute is made of a number of other settings, not just terminal server specific ones.
You can manipulate these settings via WTSSetUserConfig()
 
BOOL WTSSetUserConfig(
  LPTSTR pServerName,
  LPTSTR pUserName,
  WTS_CONFIG_CLASS WTSConfigClass,
  LPTSTR pBuffer,
  DWORD DataLength
);
 

typedef enum _WTS_CONFIG_CLASS
{
  WTSUserConfigInitialProgram,
  WTSUserConfigWorkingDirectory,
  WTSUserConfigfInheritInitialProgram,
  WTSUserConfigfAllowLogonTerminalServer,
  WTSUserConfigTimeoutSettingsConnections,
  WTSUserConfigTimeoutSettingsDisconnections,
  WTSUserConfigTimeoutSettingsIdle,
  WTSUserConfigfDeviceClientDrives,
  WTSUserConfigfDeviceClientPrinters,
  WTSUserConfigfDeviceClientDefaultPrinter,
  WTSUserConfigBrokenTimeoutSettings,
  WTSUserConfigReconnectSettings,
  WTSUserConfigModemCallbackSettings,
  WTSUserConfigModemCallbackPhoneNumber,
  WTSUserConfigShadowingSettings,
  WTSUserConfigTerminalServerProfilePath,
  WTSUserConfigTerminalServerHomeDir,
  WTSUserConfigTerminalServerHomeDirDrive,
  WTSUserConfigfTerminalServerRemoteHomeDir
} WTS_CONFIG_CLASS;
 
I believe there are a number of wrappers that folks have written for this set of API's , just google it.
 
If you are using Windows 2003 you can set the users Terminal Server profile path per machine via GPO - there is also a WMI provider for general Terminal Server settings.
 
As far as dsget, dsmod etc.. these generally manipulate ldap data - it doesnt have the know-how to break down the blobs to respective data.
 
 
-steve
 
----- Original Message -----
Sent: Wednesday, June 02, 2004 5:22 AM
Subject: [ActiveDir] Terminal Server profile path in ADSIEDIT?

How can I modify the schema to allow the terminal server profile to be one of the attributes copied when creating new users based on a template user that is copied? I looked in adsiedit to see which attribute had the terminal server profile path as its value but I did not see it. I did notice a terminalserver attribute but it was blank, where is this path stored?
 
And yes I know that this can be scripted or third party apps like Hyena can be used to do this, but the client that wants this capability is use to using User Manager to copy users and with it the terminal server properties where copied.
 
I also find it very annoying that Microsoft gives you the multi-edit functionality to ADUC but leaves out the Terminal Server tab and all of the ds cmd line tools (dsadd, dsget, dsmod) have no option for the terminal server attributes. Hyena has always been able to do this.
Common Microsoft if Hyena can figure it out why cant you!!!
This communication, together with any attachments, may contain information that is confidential, proprietary, legally privileged or otherwise exempt from disclosure. If you are not the intended recipient of this communication, you are hereby notified that the distribution, reading, copying or other use of this communication and any attachment hereto is strictly prohibited. If you have received this in error, please reply immediately to the sender and delete or destroy this communication. Thank you for your cooperation.

===========================================================

Important:
This electronic mail message and any attached files contain information
intended for the exclusive use of the individual or entity to whom it is
addressed and may contain information that is proprietary, privileged,
confidential and/or exempt from disclosure under applicable law.  If you
are not the intended recipient, you are hereby notified that any viewing,
copying, disclosure or distribution of this information may be subject to
legal restriction or sanction.  Please notify the sender, by electronic
mail or telephone, of any unintended recipients and delete the original
message without making any copies.

===========================================================

Reply via email to