[THIN] Re: change profle path in AD

  • From: "Mack, Rick" <RMack@xxxxxxxxxxxxxx>
  • To: "'thin@xxxxxxxxxxxxx'" <thin@xxxxxxxxxxxxx>
  • Date: Wed, 30 Oct 2002 23:27:31 +1100

Hi Russel,

Actually the ADSI scripting, in Kix 4.11 of course, is quite capable of
handling the TS stuff in win2k. 

For example, elaborating slightly from some Kix examples, and reading a user
list from an external file:

; adsitest.kix - play with AD user info
; read user list from file

IF Open(3,"users.lst") = 0
     $User = Rtrim(ReadLine(3))
        ? "$User"
        WHILE @ERROR = 0
;       gosub getinfo
;     gosub putinfo
        $user = Rtrim(ReadLine(3))
        ? "$user"
Close (3)
  ? "User list not accessible, error code: [" + @ERROR + "]"
goto end

:getinfo example
$aduser = GetObject("WinNT://domain/" + $User + ",user")
                ?"User Info"
                ? "Accountname                  = " $aduser.name
                ? "LoginScript                  = " $aduser.LoginScript 
                ? "Profile                      = " $aduser.Profile 
                ? "HomeDirectory                = " $aduser.HomeDirectory 
                ? "HomeDirDrive                 = " $aduser.HomeDirDrive
                ? "TerminalServicesProfilePath  = "
                ? "TerminalServicesHomeDir      = "
                ? "TerminalServicesHomeDirDrive = "
                ? "MaxIdleTime                  = " $aduser.MaxIdleTime
                ? "ReConnectionAction           = "
                ? "EnableRemoteControl          = "


:putinfo example
$aduser = GetObject("WinNT://GT/" + $User + ",user")


Getobject reads the object into cache
createobject creates a new object in cache 
$propertyname.put, writes values to cache
$ojectname.Setinfo writes cache to AD

Check the Microsoft scripting site for other objects etc.

Theres also wts_admin.dll from bhay@xxxxxxxxxxxx which handles the TS stuff
on NT 4.0 TSE.



Ulrich Mack
Volante Systems
18 Heussler Terrace, Milton 4064
Queensland Australia
tel +61 7 32467704

-----Original Message-----
From: Robertson, Russell [mailto:Russell.Robertson@xxxxxxxx] 
Sent: Wednesday, 30 October 2002 7:39 PM
To: 'thin@xxxxxxxxxxxxx'
Subject: [THIN] Re: change profle path in AD

If it is terminal server home shares and profiles, you'll need to use the
TSCMD utility as the ADSI scripting stuff doesn't work with the TS settings
(or not that we could see).

This email may be confidential and/or privileged. Only the intended 
recipient may access or use it. Any dissemination, distribution or
copying of this email is strictly prohibited. If you are not the
intended recipient please notify us immediately by return email and
then erase the email.

We use virus scanning software but exclude all liability for viruses 
or similar in any attachment or message...,..,..,.


This weeks Sponsor NetX Inc Thin Client
NetX Develops XP and NT Embedded 
Thin Client Solutions, Easy to Configure, 
Extremely Secure, and Remotely Managed.
Check out our recently updated website at
Visit Jim Kenzig of thethin.net at the
Emergent Online Booth #26 at Citrix Iforum 2002!
Register now at:
For Archives, to Unsubscribe, Subscribe or 
set Digest or Vacation mode use the below link.


Other related posts: