Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We had a distribution group on Exchange 2010 which didn't had any members for long time (nobody noticed). What happens to the emails that come to such group? There was no return messages or anything.

share|improve this question
up vote 6 down vote accepted

Unfortunately all those emails have gone into the black hole. Exchange has done it's job, it looked up recipients but nothing exist, therefore discards the email. You would need an archive/compliance setup to retrieve those emails.

Also note: You would not receive any NDRs either, the process did completed as expected.

share|improve this answer
As I expected but wanted to confirm. Thanks – MadBoy Feb 16 '12 at 11:14

They go nowhere unfortunately. We've set up a PowerShell script that runs daily and will email us if it finds empty distribution groups.

Just put this in a .ps1 file and schedule it to run at whatever interval you prefer.

$FromAddress = ""
$ToAddress = ""
$MessageSubject = "Empty distribution groups"
$SendingServer = ""

$groups = Get-DistributionGroup
$emptygroups = ($groups | ? { !(Get-DistributionGroupMember $_) })

if ($emptygroups.count -gt 0) {
    $MessageBody = "The following Exchange distribution groups have no members:`r`n`r`n"
    $MessageBody += ($emptygroups | Select-Object DisplayName | Out-String)

    $SMTPMessage = New-Object System.Net.Mail.MailMessage $FromAddress, $ToAddress, $MessageSubject, $MessageBody

    $SMTPClient = New-Object System.Net.Mail.SMTPClient $SendingServer
share|improve this answer
Thanks. Nice script. Definitely gonna set it up. – MadBoy Feb 16 '12 at 11:44

Here's an update on possible code. A more efficient query since it only returns a list of empty groups. A bit obtuse since one is led to think Get-DistributionGroup doesn't know about members (thus the need for the Get-DistributionGroupMember cmdlet).

$emptygroups = Get-DistributionGroup -Filter {members -eq $null}

I've confirmed that works on Exchange 2010, SP2, RU5v2.

share|improve this answer
Thanks I'll verify – MadBoy Jul 14 '13 at 10:43

Thanks! For me the nothing was happening with the above script - not sure if it's a different Powershell version or such like (Exchange 2010, Server 2008 R2) but there was nothing in the "count" attribute.

I had to replace:

if ($emptygroups.count -gt 0) {


$emptygroupcount = echo $emptygroups | measure
if ($emptygroupcount.Count -gt 0) {

If anyone is wondering how to do a schedule of this, since the "basic" Powershell doesn't recognise the Exchange commands, I created a wrapper batch file as per

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.