The ULS is used in environments of 15-20,000 users without issue and, depending on the number of resources being processed, can complete in sub-second times. In real-world testing, it can process 12 resources (11 direct, 1 lookup) in 0.88 seconds, and 40 resources with six 500-record lookup tables in under 8 seconds The script has a timestamp logging option with 1-ms resolution so you can optimize performance on a per-resource basis.
The login script config file defines a set of resource data. There are two formats that will do what you need:
PATH=\\server\share\&AD:AttributeName&
This changes the lookup tag "&AD:AttributeName&" to the value read from AD for the current user. If the value is empty, this resource is ignored. This example uses a fixed server and share with a variable subfolder. The lookup can replace any part or all of the path string.
PATH=&AD:AttributeName:TableName&
This example changes the lookup tag by obtaining the value associated with the defined attribute for the current user. This value is then used to locate a match in the lookup table. If "TableName" was "AD_Lookup" and the value of the "Department" attribute was "Northeast Sales", the following table would be scanned and the path associated with Northeast Sales would be used.
[AD_Lookup]
Southeast Sales=\\server1\share\folder
Northeast Sales=\\server2\share\folder
As for coding it yourself:
The UDFs I referenced earlier use direct calls to first translate a userid to a DN string, and then use the DN string and LDAP attribute to return the value - no enumeration, so very fast. Calling the UDF with just the userid returns the DN string, so no complex external coding, either.
Glenn
_________________________
Actually I
am a Rocket Scientist!