Skip to main content

Posts

Showing posts with the label ItemAge

Reporting on the Item Age (Count and Size) in a Mailbox using EWS and Powershell (MEC Sample)

This is sample 2 from the Item Age section of my MEC talk in this sample we'll look at reporting on the Folder ItemCounts and Size of Item's in a Mailbox based on the age of those items. To work out the Size and Item Count of all the Items in a Mailbox and be able to report on the age of those Items requires that you enumerate through every item in every folder in a Mailbox. Doing this on a mailbox with a large number of folder Items will take some time (it's pretty elementary Watson). So to reduce the amount of work that the server has to do to return information about all the Items in the Mailbox it's important to use the IdOnly BasePropertySet and then add the properties that are required. For this report the following properties are used. Size, DateTimeReceived, DateTimeCreated This script first uses a FindFolder operation to enumerate all folders in a Mailbox and then on each folder a findItems is used to enumerate ever item. Using just these three properti...
All sample scripts and source code is provided by for illustrative purposes only. All examples are untested in different environments and therefore, I cannot guarantee or imply reliability, serviceability, or function of these programs.

All code contained herein is provided to you "AS IS" without any warranties of any kind. The implied warranties of non-infringement, merchantability and fitness for a particular purpose are expressly disclaimed.