Solved

VBScript AD Search

Posted on 2012-03-13
2
708 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
Comment Utility
Hi Joolz,

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

Cheers
Daniel
AD-GetUserInfo.vbs
0
 

Author Closing Comment

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

Joolz
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

I know all systems administrator at some time or another has had to create a script to copy file from a server share to a desktop. Well now there is an easy way to do this in Group Policy. Using Group policy preferences is not hard. The first thing …
Introduction You may have a need to setup a group of users to allow local administrative access on workstations.  In a domain environment this can easily be achieved with Restricted Groups and Group Policies. This article will demonstrate how to…
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…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

763 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now