Here is the most basic way I know of to return the Ldap path of the OU the user is located in. From that point, you can bind to to OU object and extract any additional information you might need.
'>Bind to Active Directory System Info
Set AdsSysteminfo = CreateObject("adsysteminfo")
UserOU = GetObject("LDAP://" & adsSysteminfo.UserName).Parent
msgbox UserOU
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.