Disclaimer: We hope that the information on these pages is valuable to you.
Your use of the information contained in these pages, however, is at your sole risk.
All information on these pages is provided "as -is", without any warranty, whether express or implied,
of its accuracy, completeness, fitness for a particular purpose, title or non-infringement,
and none of the third-party products or information mentioned in the work are authored, recommended, supported or guaranteed by site owners or operators.
Further, the site owners and operators shall not be liable for any damages you may sustain by using this information,
whether direct, indirect, special, incidental or consequential, even if it has been advised of the possibility of such damages.
Warning: main(/home/prosphot/public_html/smog/track/write_logs.php) [function.main]: failed to open stream: No such file or directory in /home/prosphot/public_html/blog/skins/leaf/footer.php on line 3
Warning: main(/home/prosphot/public_html/smog/track/write_logs.php) [function.main]: failed to open stream: No such file or directory in /home/prosphot/public_html/blog/skins/leaf/footer.php on line 3
Warning: main() [function.include]: Failed opening '/home/prosphot/public_html/smog/track/write_logs.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/prosphot/public_html/blog/skins/leaf/footer.php on line 3
Mon 06.16.08: Powershell - Exchange 2007 - All Addresses
I needed to get a list of all email adresses in our organization so I could then upload this list to our ANTI-SPAM appliance so it would reject sessions from other SMTP hosts where the email address is not found in this list.Here is the script that I use....
$a = get-recipient -ResultSize Unlimited
foreach ($recipient in $a) {
$b = get-recipient $recipient.alias
foreach ($item in $b.EmailAddresses) {
If ($item -like 'SMTP:*' -or $item -like 'smtp:*') {
write-output $item.SmtpAddress.ToLower()
}
}
}
As always, contact me if you have questions....
Item Rating Information....