If you are like most companies, when staff leave you delete their email accounts but you likely don’t give much thought to the Distribution Lists that they used. After a few years you can have quite a few unused Distribution Lists which does not do anyone good so you should remove them. However, your likely afraid to just dump them based on your intuition that they are unused and so you need some numbers to prove they are dead. Below are several ways to determine what Distribution Lists are used or unused in Exchange PowerShell.
How to Output the Date, Distribution List Name and Subject in Exchange:
The following command will push out an unsorted list (which you can sort in Excel) to C:\TEST.TXT of all emails sent to a distribution list after August 16, 2015. You could export all of the Distribution List
Get-MessageTrackingLog -Start 08/16/2015 -ResultSize 99999 -EventID Expand | ft Timestamp,RelatedRecipientAddress,MessageSubject -Autosize >c:\test.txt
How to Count all of the Messages sent to a Particular Distribution List in Exchange:
The following command will display a count of emails sent to a single email address from August 1 2015 at to September 1 2015. That address can be a distribution list.
Get-MessageTrackingLog -start “08/01/2015 12:00:00” -End “09/01/2015 12:00:00” -Recipients “[email protected]” -ResultSize 99999 | measure-object
For more information, you may find the following articles useful (I know I did):
Share This With Your Friends Now: