|
Hi,
I'm in the process of cleaning up our company's login script. I've decided to port the entire thing over to KIX but I'm having trouble with the ADSI elements. I've looked and I've looked and I've yet to find a really good description of ADSI and I'm quite weak on COM/ADSI.
What I'm trying to do is two fold:
1> I am trying to write a function that takes as input either a user or a computer and returns that object's location in the AD tree.
2> Once I have found the object I would like to see 20 custom exchange attributes that are properties of the users, and if possible the other properties that show up in the GUI when you look at a user or computer.
Thus far I've managed to connect to the ROOTDSE but umm, thats about it.
Could anyone guide me on how to make a UDF that functions just like the DSQUERY command and then help me reveal that object's attributes?
I was thinking:
QueryDS($objName) ;pass either a computer name or user name to a function. Return the location of that object in AD by expressing it as its Full LDAP name
CaptureProperties($ObjDNName) ;Store the user account properties by querying LDAP on the user and then passing to an array
____ Thanks for any help you may be able to offer.
|