You need to get a list of all valid recipient addresses on an Exchange server (e.g., to get a list for Mail Essentials Online).
This is most easily done with the Get-Recipient cmdlet in the Exchange Shell.
- Log on to the Exchange server and launch the Exchange Shell from the Start Menu
- The Get-Recipient cmdlet generates a lot of output so you’ll want to filter it a bit. Also, the emailAddresses field can potentially have multiple values so you’ll need to expand it. Finally, you’ll want to save the output to a file for easy access::
Get-Recipient -ResultSize unlimited | Select -Expand emailAddresses | Export-CSV recipient-list.csv
That CSV will contain a list of all valid recipients, including some that are not “real” addresses (such the Discovery mailbox) that would need to receive mail from external senders.