Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 719
  • Last Modified:

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
0
joolzhaines
Asked:
joolzhaines
1 Solution
 
dax_badCommented:
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

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now