VBScript AD Search

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
joolzhainesAsked:
Who is Participating?
 
dax_badConnect With a Mentor Commented:
Hi Joolz,

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

Cheers
Daniel
AD-GetUserInfo.vbs
0
 
joolzhainesAuthor Commented:
Excellent, If i could give more then 500 point I would, saved me a lot of time..

Joolz
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.