Exchange 2010 – Add All Users to a Distribution List

If you need to quickly create an all mail-enabled users Distribution Group for your company you can get this result easily.

This powershell command will add mail-enabled users to the ‘All user Company’ distribution list and it will exclude all other mail object (Discovery Services, Booking Resources, Meeting Room Resources).

On Exchange server you'll need to execute Exchange Powershell command


foreach($mbx in Get-Mailbox -Filter { RecipientTypeDetails -eq "UserMailbox"}){Get-Mailbox $mbx.identity | Add-DistributionGroupMember -Identity "All user Company"}

[original article gently forwarded me by Emanuele Panseccohttp://www.itsupportguides.com/exchange-2010/exchange-2010-add-all-users-to-a-distribution-list/]