Avatar of AKSO
AKSO
Flag for United Kingdom of Great Britain and Northern Ireland asked on

VBS Script to find email address from list of user ID's and export to xls

Hi All,

I'm trying to find a VBS script to search AD for primary email addresses from a list of user ID's I have in an Excel spreadsheet and update the spreadsheet in another column or export to a seperate file. I thought that this would be an easy one to find but I have had no luck. Can anyone point me in the right direction, or maybe provide me with a smilar script I could modify?

Thanks,

AKSO
VB ScriptActive Directory

Avatar of undefined
Last Comment
ashutoshsapre

8/22/2022 - Mon
sshah254

try this

from a dos command prompt, type

ldifde -l mail -f output.txt

This will export all the accounts and their email addresses in the file output.txt.

Manipulate that file.

There are a bunch of options for ldifde that you can get from here - http://support.microsoft.com/kb/237677

Ss
AKSO

ASKER
Hi sshah254,

Many thanks for your response but I was looking more for something in VBS. If all else fails I'll have a play with this thugh. We have over 50k accounts on our domain so I need to limit the results to the accounts that I need.

Thanks,

AKSO
ASKER CERTIFIED SOLUTION
ashutoshsapre

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
ashutoshsapre

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
AKSO

ASKER
Hi Ashutoshsapre,

Thank you very much for providing the script and instructions, everything worked exactly as described, I now have my list of email addresses.

Sshah254,

Thanks again for your input, it's much appreciated.

Thanks,

AKSO
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
ashutoshsapre

Anytime... thanks for the rating :)