Solved

VBScript AD Search

Posted on 2012-03-13
2
714 Views
Last Modified: 2012-03-19
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
Comment
Question by:joolzhaines
2 Comments
 
LVL 6

Accepted Solution

by:
dax_bad earned 500 total points
ID: 37714336
Hi Joolz,

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

Cheers
Daniel
AD-GetUserInfo.vbs
0
 

Author Closing Comment

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

Joolz
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Last week, our Skyport webinar on “How to secure your Active Directory” (https://www.experts-exchange.com/videos/5810/Webinar-Is-Your-Active-Directory-as-Secure-as-You-Think.html?cid=Gene_Skyport) provided 218 attendees with a step-by-step guide for…
This article outlines the process to identify and resolve account lockout in an Active Directory environment.
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question