We help IT Professionals succeed at work.

VBScript AD Search

joolzhaines
joolzhaines asked
on
Hi,

I am trying to write VBscript code to find a users homepath and the only information I have is there logonname, for example this is what I have so far;

Dim objSysInfo, objUser
Set objSysInfo = CreateObject("ADSystemInfo")
Set objUser = GetObject("LDAP://" + "username")

So if I have uses logon name of JAH I want to find there homepath for example "\\server\profiles\jah"

All the LDAP search seem to need the full CN user name to work..

Regards
Joolz
Comment
Watch Question

Commented:
Hi Joolz,

Try out this script. Just enter the username in the textbox.

Cheers
Daniel
AD-GetUserInfo.vbs

Author

Commented:
Excellent, If i could give more then 500 point I would, saved me a lot of time..

Joolz

Explore More ContentExplore courses, solutions, and other research materials related to this topic.