When working on the new function _AD_GetObjectOU (returns the OU of a user, group, computer etc.) I noticed the big performance advantage you get when using ADsPath.
(example: processing 120 users to retrieve the OU takes 207ms compared to 1041ms - so it is about 5 times faster).
At the moment functions either accept SamAccountName or FQDN as parameters to identify an AD object.
Where would you benefit?
It takes a lot fo time when you use _AD_GetObjectsInOU to retrieve objects fitting the search pattern and then need to loop through the resulting array calling _AD_GetobjectProperties for each object to retrieve additional properties.
By using ADsPath this should run much faster.
But it needs
- me to modify a lot of functions in the AD UDF to accept ADsPath as a parameter
- you to change your script
What do you think? Is it worth the effort.