quagmire1973 Posted November 29, 2005 Share Posted November 29, 2005 I currently use an autoit program in a Windows 2000 Active Directory domain. In AutoIT, there is a macro reference for a username. I use this username in a log file I generate from Autoit. The username is typically an Active Directory (AD) username for my domain. I would like my autoit script to pull the Full Name property from Active Directory so that I can log this information as well. Any ideas? Link to comment Share on other sites More sharing options...
djek Posted November 29, 2005 Share Posted November 29, 2005 I would like my autoit script to pull the Full Name property from Active Directory use wmi _fullname() Func _fullname() $objInfo = ObjCreate("ADSystemInfo") $objUser = ObjGet("LDAP://" & $objInfo.Username & "") if @error then return @UserName endif Return $objUser.fullname EndFunc Yes I stole it, so what Link to comment Share on other sites More sharing options...
quagmire1973 Posted November 29, 2005 Author Share Posted November 29, 2005 use wmi _fullname() Func _fullname() $objInfo = ObjCreate("ADSystemInfo") $objUser = ObjGet("LDAP://" & $objInfo.Username & "") if @error then return @UserName endif Return $objUser.fullname EndFunc Yes I stole it, so what Awesome. Thanks. Now, I know squat about LDAP queries, so if my AD domain is say "gorak.com", how would I format the query? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now