Delete An Email From All Mailboxes – Exchange 2007


Another day, another user who decided to give away their username and password to a phishing email. Thankfully this time it happened on a Monday morning, the spammer was kind enough to send to my internal users, and even better sent a spam to our helpdesk email. In other words – they basically told me they were sending spam from one of our mailboxes.

I did the usual – disabled the account/changed the password, blocked the spam/phishing site, purged our (growing) mail queues. But this time I really wanted to get rid of the email. So…
Powershell (Exchange Management Shell) to the rescue. Continue reading “Delete An Email From All Mailboxes – Exchange 2007”

Exchange 2007 Quick Tip: Getting Members of a Dynamic Distribution Group

If you need to get a listing of all the people (and email addresses) who will receive an email from a dynamic distribution group and then export that to CSV:

$members = Get-DynamicDistributionGroup -resultsize unlimited -Identity “Distribution Group Name”
Get-Recipient -resultsize unlimited -RecipientPreviewFilter $members.RecipientFilter | select Displayname,PrimarySmtpAddress | Export-Csv C:\temp\NameOfCSV.Csv