(Korg Regular)
2012-09-26 12:46 AM
New possibileity for SetOption

If you have to access an AD property where the name contains a dash, the solution in vbscript is to surround it with square brackets, but if you try this in KiXtart it will be mistaken for being an array.

Could we have ie.:

$PrevState = SetOption("IgnoereBrackets","On")


$PrevState = SetOption("DisableArrays","On")


An examle can be seen here:

(KiX Supporter)
2012-09-26 02:57 AM
Re: New possibileity for SetOption

While not the solution you are looking for, there is a way to leverage vbscript right in kix...

Although I could not completely test this, it should get you in the right direction. You will need GetADUserProperties() to make this work:

$sc = CreateObject("ScriptControl")
$sc.language = "VBScript"
$sc.timeout = -1
? $sc.codeobject.msds

I would be willing to bet there is some other type of AD query that can get this info too.

(Fresh Scripter)
2012-09-26 04:35 AM
Re: New possibileity for SetOption

Also...did you try the method that one of the responses on your link suggests?


(Korg Regular)
2012-09-26 11:53 PM
Re: New possibileity for SetOption


I have tried the Get method, it works.

But if i try changing the value using the Put method, it fails


(Korg Regular)
2012-09-27 12:35 AM
Re: New possibileity for SetOption


I had not seen your way of calling VBScript before

But I managed to solve the problem using the object: ScriptControl

Thank You