Advertisement

02.15.2008 at 06:45AM PST, ID: 23166088
[x]
Attachment Details

In my Active Directory script is there someway to go by the User Logon Name rather than the Name ("LDAP://cn=")

Asked by troehm in Scripting Languages, Active Directory, VB Script

Tags: Microsoft, VBScript, Active Directory, Server 2003, Win XP

Usually in my program I use this to get what I need.

Set objUser = GetObject("LDAP://cn=Lastname/, Firstname,ou=Users,ou=1105,ou=Plants,dc=MyCompany,dc=com")

What I'm trying to accomplish here is in my program I get the User Logon Name (usually p########) of the person logged on to the computer. Then I want to be able to find out their Name in Active Directory. So far I haven't really seen anything that uses the UserLogonName as a criteria to search for stuff in AD. I've only seen stuff using the name, which is what I'm trying to figure out based on theire LogonName so I need a way where I can kind of a reverse lookup, if that makes any sense. I don't think there's a way to get their Name from windows instead since they are logging on with a numerical ID. This is why I'll need to get the information from AD. Can anyone guide me in the right direction? Thanks a bunch.Start Free Trial
 
Loading Advertisement...
 
[+][-]02.15.2008 at 07:49AM PST, ID: 20902772

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Scripting Languages, Active Directory, VB Script
Tags: Microsoft, VBScript, Active Directory, Server 2003, Win XP
Sign Up Now!
Solution Provided By: fishadr
Participating Experts: 3
Solution Grade: A
 
 
[+][-]02.15.2008 at 02:56PM PST, ID: 20906813

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.15.2008 at 03:55PM PST, ID: 20907126

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628