Work in a company long enough, and there will always be that user who does a reply-all to a large distribution list that spawns a huge reply-all storm. This normally leads to questions about how it was even possible for Bob from the warehouse to send a message to half the company, or the dozens of replies that landed in the CEO’s mailbox.
Fortunately, Exchange provides you with the ability to control who is allowed to use a distribution list. The problem is identifying what lists you may want to restrict. The good news is that using PowerShell, it’s fairly trivial to identify any Distribution Lists you have in your environment that have a large number of users in them. This is useful if you work in an environment where other departments have the ability to create Distribution Lists and you need to give them a list of the lists they need to restrict.
The basic logic is to look at all of the distribution lists in Exchange that are not restricted by either specific senders or other distribution lists, and report on the ones that have some arbitrary number of users. The following one-liner will give you a table of all of the distribution lists that have more than 500 members in them showing you the list name and the number of members in each list.