Page 1 of 1 1
Topic Options
#202595 - 2011-07-07 05:22 PM How to manipulate attribute "userParameters" with Kix...
Jaap_Lelie Offline
Fresh Scripter

Registered: 2005-04-04
Posts: 10
Loc: NL
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.

Top
#202597 - 2011-07-07 06:08 PM Re: How to manipulate attribute "userParameters" with Kix... [Re: Jaap_Lelie]
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2125
Loc: Tulsa, OK
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

Top
#202601 - 2011-07-07 10:35 PM Re: How to manipulate attribute "userParameters" with Kix... [Re: ShaneEP]
Jaap_Lelie Offline
Fresh Scripter

Registered: 2005-04-04
Posts: 10
Loc: NL
Many thanks, Shane! Will give it a whirl first thing tomorrow at the office ;-)

Best regards,
Jaap.

Top
#202631 - 2011-07-11 04:36 PM Re: How to manipulate attribute "userParameters" with Kix... [Re: Jaap_Lelie]
Jaap_Lelie Offline
Fresh Scripter

Registered: 2005-04-04
Posts: 10
Loc: NL
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.

Top
#202632 - 2011-07-11 04:57 PM Re: How to manipulate attribute "userParameters" with Kix... [Re: Jaap_Lelie]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4672
Loc: The Netherlands
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
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#202633 - 2011-07-11 06:33 PM Re: How to manipulate attribute "userParameters" with Kix... [Re: Mart]
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2125
Loc: Tulsa, OK
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.

Top
#202634 - 2011-07-11 11:44 PM Re: How to manipulate attribute "userParameters" with Kix... [Re: ShaneEP]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
wohoo. my udf was almost useful :P
_________________________
!

download KiXnet

Top
#202636 - 2011-07-11 11:53 PM Re: How to manipulate attribute "userParameters" with Kix... [Re: Lonkero]
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2125
Loc: Tulsa, OK
Haha I tried, I tried.
Top
#202637 - 2011-07-12 06:53 AM Re: How to manipulate attribute "userParameters" with Kix... [Re: ShaneEP]
Jaap_Lelie Offline
Fresh Scripter

Registered: 2005-04-04
Posts: 10
Loc: NL
LOL! :-) Will try each and every suggestion. Thanks guys!!
Top
#202638 - 2011-07-12 08:16 AM Re: How to manipulate attribute "userParameters" with Kix... [Re: Jaap_Lelie]
Jaap_Lelie Offline
Fresh Scripter

Registered: 2005-04-04
Posts: 10
Loc: NL
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.

Top
#202640 - 2011-07-12 02:39 PM Re: How to manipulate attribute "userParameters" with Kix... [Re: Jaap_Lelie]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4545
Loc: USA
Please share your whatever code you used.
Top
#202641 - 2011-07-12 06:29 PM Re: How to manipulate attribute "userParameters" with Kix... [Re: Allen]
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2125
Loc: Tulsa, OK
yes, please post the vbs you got working...I'm sure we could convert it to kix for any future onlookers.
Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 466 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.064 seconds in which 0.027 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org