TheCleaner
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)
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)
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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Rob...
No worries.....BTW, I've since discovered that instead of using objRecordSet.Fields(1)
you can use objRecordSet.Fields("adsPa th")
so that it explicitly uses that field....
Regards,
Rob.
you can use objRecordSet.Fields("adsPa
so that it explicitly uses that field....
Regards,
Rob.
ASKER
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