When it comes to searching a Mailbox with EWS with a Script, eDiscovery on Exchange 2013 makes things a lot easier and faster by basically allowing a Mailbox (and Archive) wide search rather then a folder by folder crawl which you had to do with AQS on Exchange 2010. I posted a paging sample a few months back to show how you can page through the results of a eDiscovery using the EWS Managed API. The following script is an application of this to produce a report of Items that are larger then a certain size in the Mailbox and Archive. To give the Folder path of the folder where the items are located the script grabs the FolderPaths and produces a report like To run a discovery just feed it the Mailbox you want to run it against, and to set the size of the Items you want to find you can modify the following variable that holds the KQL query (the following finds items larger then 10 MB) $KQL = "size>10485760" I've put a download of this script here t...
Pushing the Envelope in Messaging and Office 365 Development