|
|
|||||||
I am unable to utilize the filter method when working with ADSI objects. I'm not sure if this is a KiX limitation or if the syntax is slightly different then from VB. Here's how it works in VB (and I've looked at dozens of script to make sure this is the absolute correct way)... code:This code prevents groups and computers from being returned when all items are enumerated. However, when I try to use the .filter method in a KiX script it never filters anything. I don't get an error, and I can even use really bad syntax and it still won't return an error. This is leading me to believe that for whatever reason KiX is not supporting the .filter method. Here's some code I am trying to use...Set NTDomain = GetObject("WinNT://YourDomainName") code:Anyone have any insight on this?BREAK ON -Ben http://www.rgcweb.org/kix |
||||||||
|
|
|||||||
Yeah, the syntax is different in KiX. Try... code:$adsDomain.Filter = "User","" |
||||||||
|
|
|||||||
BTW, KiX has no function called Array(). |
||||||||
|
|
|||||||
I have to admit that Lonkero's BBChecker could be the best thing to happen to this board (other then KiX and KiXForms of course ). These responses come in so fast. Thanks for the correction Chris. It works fine now. I didn't think Array() would work, but I tried "User" and User and "resU" and couldn't get anywhere. I'll now be able to add the filter back into my User Manager tool and it should help speed things up for people with lots of objects in their AD. -Ben http://www.rgcweb.org/kix |
||||||||
|
|
|||||||
Note that: $adsDomain.Filter = "User","" Only works for the WinNT:// provider. You have to make an array for the LDAP:// provider. Dim $Array[0] $Array[0] = "User" $adsDomain.Filter = $Array [ 04. December 2002, 15:44: Message edited by: Howard Bullock ] |
||||||||
|
|
|||||||
Did not know that. I'll file that for future reference (if we ever get AD here ). Thanks, Howard. |
||||||||
|
|
|||||||
Howard is correct, but I'm fairly sure that kix will take ARRAY without the other arguments. I've converted some VB scripts before without using all the "correct" KiX syntax and the code did work. I'll have to look around and see if I can find that one. It was about 6 months or so ago now. |
||||||||
|
|
|||||||
Well, it will even accept... code:...and not burp, but the filter won't actually filter anything out.$adsDomain.Filter = EveryGoodBoyDoesFine() |