I need to be able to list all the email addresses both primary and alias that exist in a domain (Exchange 2010), and place those into a SQL Server table.
I would therefore like a powershell script that populates a table with:
Username, EmailAddress, PrimaryOrAliasIndicator.
The script will be run as a scheduled task once per day. Therefore, it should run without user interaction. It is quite ok to delete the table and re-enter on each occasion, rather than update.
Table code below.
CREATE TABLE AD_EMAILS (
USERNAME varchar(100) default '',
EMAIL_ADDRESS varchar(300) default '',
E_TYPE varchar(20) default '')
I am a Powershell & MSSQL expert and can this done for you within the day. Quick Summary: 15 years experience with small - large organisations, native English speaker. Any questions let me know.