This UDF is one of my most often used at work. I use Autoit to automate our Windows PC build process, and much of what I need to do is based around Active Directory. I've written scripts to unexpire and reset passwords, join a computer to the domain and rename it, remove old computers from the domain, check to see whether a user is in a specific AD group, grab a list of users from AD to assign new computers to, add users to groups, etc. Everything centers around this wonderful UDF. If you're a Windows domain administrator who uses scripting to make your life easier, you absolutely need this code. The functions in the UDF are well documented, and there are lots of examples to show how things work. Highly recommend. Thank you Water for all the time and effort you put into this!