Please also read the end of the Incontainer thread ( http://www.kixtart.org/ubbthreads/showflat.php?Cat=0&Number=82433&an=0&page=0#82433 )

Depending on your usage it could add unnecessary round trips to the AD for each user lookup. Radimus has added another approach that is more network friendly if you are checking to see if a user is in a list of OUs.


As for your sample code you want to remove the "\\" from @lserver - use substr(@lserver, 3).

Your single domain should not be an issue if you have a DC in each major site. You should also investigate to insure the AD sites have been configured with the proper list of subnets. This will keep your AD aware client talking to the closest DC.


Edited by Howard Bullock (2005-04-13 07:35 PM)
_________________________
Home page: http://www.kixhelp.com/hb/