|
|
|||||||
Hi all, For a project, I need to manipulate 100+ user objects, and modify the userParameters attribute. More precisely, I need to configure the Terminal Services Profile Path. With an old(er) LDAP browser I can't read the value of this attribute (encoded). With a newer version of that same LDAP browser (www.softerra.com) I am able to read the contents of the attribute (multivalue). My Q: Is it possible to manipulate this attribute using Kix? If so: any pointers? All feedback greatly appreciated! Best regards, Jaap. |
||||||||
|
|
|||||||
You can give the ADProperty() a shot... http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Board=7&Number=202261 Example (untested...I dont have AD where I am)... Code: ADProperty("LDAP://CN=me,DC=myCompany,DC=org","TerminalServicesProfilePath","\\server\share\") Function ADProperty($LDAPPath, $property, optional $value) dim $object $object=getobject($LDAPPath) if not len($value) $ADProperty=$object.get($property) else $object.putEx(2,$property,split($value)) $object.setinfo endif EndFunction |
||||||||
|
|
|||||||
Many thanks, Shane! Will give it a whirl first thing tomorrow at the office ;-) Best regards, Jaap. |
||||||||
|
|
|||||||
Hi Shane, Though the ADProperty function may work well on non-encoded variables, it's sadly a "no-go" on the userParameters variable. When running this on an object that doesn't have the userParameter variable yet, I get a bunch of numbers as if it's encoded. Strangely though, my LDAP browser can read the userParameters variable of another (predefined) object just fine... :-$ I'm starting to wonder if it's at all possible to enter a value in this encoded variable thru kix. Glad to take hints though! :-) Best regards, Jaap Lelie. |
||||||||
|
|
|||||||
Hi Jaap, Not sure but this might help. There seem to be two API's that can be called (at least from VB) and are able to read and modify the data for TS settings in AD. I’m almost as blind as a bat in VB world so I’m not much help there but it might be possible to do the same thing in kix. http://support.microsoft.com/kb/292631 |
||||||||
|
|
|||||||
Maybe check out this page... http://social.technet.microsoft.com/Forums/en-US/ITCG/thread/2e2a5e62-a1df-4fc7-bf4e-db9bc85098cb/ Seems to be some good info there concerning the same situation. |
||||||||
|
|
|||||||
wohoo. my udf was almost useful :P |
||||||||
|
|
|||||||
Haha I tried, I tried. |
||||||||
|
|
|||||||
LOL! :-) Will try each and every suggestion. Thanks guys!! |
||||||||
|
|
|||||||
Well, being a VBS virgin myself, I took the code that was supplied in one of the above suggestions, and managed to come up with a Command prompt commandline that actually reads a CSV file. I then parse that info into the VBS script as var1 and var2... and it works. It looks like an abomination code-wise, but at least it works for now... and with that new-found knowledge I will be able to jack up my VBS knowledge bit by bit. I agree that in the end this has nothing to do with KiXtart (although I -could- adapt the script to be called from within Kix), apologies for that. However it started out with a kix question... ;-) Thanks to all who contributed! Much appreciated. Have phun, Jaap. |
||||||||
|
|
|||||||
Please share your whatever code you used. |
||||||||
|
|
|||||||
yes, please post the vbs you got working...I'm sure we could convert it to kix for any future onlookers. |