Click here for important information about

VBScript to get user info from AD

August 7, 2010 at 16:42:28
Specs: Window 2003
I hope I am posting this request in the correct forum...
I have a text file of user IDs that I need to run againts AD to get their profile information, such as name, address, phone, etc. The output can be any format.
I would greatly appreciate if someone can point me in the right direction for this.

See More: VBScript to get user info from AD

August 8, 2010 at 13:38:10
What do these ID's look like?

Report •

August 8, 2010 at 13:51:36
email address format.

Report •

August 9, 2010 at 11:58:31
Not sure about a vb file, but I have a batch file solution.

If you put all your email addresses in a txt file, with one on each line - this should accomplish what you're looking for.

for /f "tokens=1 delims=@" %%a in (emails.txt) do (
Echo User: %%a >>output.txt
dsquery user -samid %%a | dsget user -display -desc -email >>output.txt
Echo. >>output.txt

You can change the attributes on the dsget command to suit your needs (what information you want returned for the user)

Report •

Related Solutions

August 11, 2010 at 09:28:24
Thanks. I was able to get the information I needed.

Report •

Ask Question