Avatar of joolzhaines
joolzhaines
Flag for United Kingdom of Great Britain and Northern Ireland asked on

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
Active DirectoryVB Script

Avatar of undefined
Last Comment
joolzhaines

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
dax_bad

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
joolzhaines

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

Joolz
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck