Link to home
Start Free TrialLog in
Avatar of TheCleaner
TheCleanerFlag for United States of America

asked on

Need script help - input.csv > AD query > output.csv

I have an input file called input.csv that has:

FirstName, LastName, EmployeeID

I want to do the following using a vbscript:

1.  Take Input File
2.  Query AD based on matching a Surname/LastName
3.  If match is found, include it as part of a new output.csv with given name/firstname and surname/last name from Active Directory


Any help is appreciated. (paging Chris-Dent...lol)
Avatar of TheCleaner
TheCleaner
Flag of United States of America image

ASKER

Oops...forgot to mention that I need the output.csv to also include the original employeeID column value from the input .csv.

So example would be like this:

Firstname              LastName       EmployeeID
Joe                           Dirt                  12345
Bob                          Smith                55555


Query to AD finds user with a lastname of Dirt....

Output.csv records as:

Firstname              LastName       EmployeeID
Joseph                      Dirt                  12345

You might want to look into using kixtart:
http://www.kixtart.org

it is a very powerfull scripting language, well documented, can take just about any format text file as input, and interface with AD via LDAP and free.
ASKER CERTIFIED SOLUTION
Avatar of RobSampson
RobSampson
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks Rob...
No worries.....BTW, I've since discovered that instead of using objRecordSet.Fields(1)
you can use objRecordSet.Fields("adsPath")
so that it explicitly uses that field....

Regards,

Rob.