Creating a Mailbox Contents Report with PowerShell and the Graph



This article explains how to create a mailbox contents report using PowerShell and Microsoft Graph API requests. The list of mailbox items is exported to an Excel workbook. The idea is that you could then browse the workbook and highlight items that you want to remove from the mailbox, maybe even using a (still to be written) script to read the items from the workbook and delete the mailbox items. In any case, it's an interesting demonstration of how to use the Graph to interact with mailbox contents, including getting the size of mailbox items, which was way more difficult than I expected!

0 Replies