[THIN] Scripting with TerminalServer.DLL

  • From: "Boatman, Dave" <Dave.Boatman@xxxxxxxxxxxxxx>
  • To: thin@xxxxxxxxxxxxx
  • Date: Fri, 19 Jul 2002 12:56:58 +0100

Scripting - on a W2K AD, with TerminalServer.DLL

What I'm trying to do :
I'm getting a list of all the users from a particular OU and then I want to
programmatically  add the information to the Terminal Services Profile tab
for each user (only within that OU)

What I have:
I have a bunch of OU's ( i.e. not the Users container) which hold the T/S
users which I created via another script. Does the setsprofilepath property
of the TerminalServer.DLL understand LDAP  - i.e
OU=TSUsers,DC=Banana,DC=Local ? If so what's the syntax ?

I suppose if the .DLL isn't OU aware then I could write a list of the users
in the OU to a file or array, then move them to the Users default container
and only modify the list of usernames I got before I moved them and then
finally move them back.. sounds like a bit of a long way round though.


****************
' This is the only example I have of the terminalserver.dl 

set obj=createobject("terminalserver.functions")

strServer="Server" 'domain controller or server name of terminal server if
not working with a domain
strUserid="test" 'userid to change
strProfilePath="\\Server\someshare" 'new directory to change user's
homedirectory to.
strHomeDrive="w" 'new driveto change user's homedrive to.
strHomeDirectory="\\Server\anothershare"

retval=obj.settsprofilepath(strServer,len(strServer),strUserid,len(strUserid
),strProfilePath,len(strProfilePath))

***************************


Dave Boatman




***********************************************************
This message is confidential and intended for the exclusive 
use of the addressee(s) only and remains the property of 
Exchange FS Group plc. You should not disclose its contents 
to any other person. If you are not the intended recipient 
please notify the sender named above immediately.

Registered Office: Munro House, Portsmouth Road, Cobham, 
Surrey, KT11 1TE. Registered in England No. 2596452
***********************************************************

Other related posts: