Exchange 2010 find empty distribution groups

This post is also available in: Polish

When we often create distribution groups, we forget about them.

Then we can have empty distribution groups in our Exchange Organization.

To find empty groups we can use Powershell.

First solution we can use EMS with below commands:

$DGs = Get-DistributionGroup -resultsize unlimited
$DGs | where-object {!(Get-DistributionGroupMember $_)}

As a result we receive list of empty distributions groups.

Second solution is to use PowerShell and Quest ActiveDirectory snapin like below:

Get-QADGroup -SizeLimit 0 -Empty $true -GroupType Distribution

Then we can get also empty distribution groups, but we can also modify this command to find security groups.

 

 

Print Friendly
Tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>