Exchange 2010 remove disabled users from distribution group

To keep Exchange Distribution Groups in order, we recommend to “clean” members of those groups.

We should remove all disabled users from distribution groups.

When we have a lot of Distribution Group we can use powershell script like below to do this.

This script gets all Distribution Groups from Exchange Organization, then will check every group for users which are disabled and they have Active Directory account in specified OU.

This script will also export all informations to a .csv file, where you can find following informations:

 

  • Name of distribution group
  • user DisplayName
  • SamAccountName
  • path in Active Directory to user account

Continue reading