Script Dumpster: List all email addresses and Mailbox Size - OnPrem & O365
Update
I’ve optimized the script to now only query each mailbox once and have increased the speed in this customer’s environment for On-premise from 1 minute 49 seconds to 26 seconds. The Office 365 code was optimized similarly and went down from 22 minutes 14 seconds to 7 minutes 21 seconds.
The output of the optimized script is identical to the original one.
Intro
As the title suggest, I had a customer asking for a list of all email addresses within the company and the accompanying mailbox sizes.
