Writing an Exchange Online Mailbox Clean-up Script Using the Microsoft Graph

MVP

This article describes how to write a PowerShell script to search user mailboxes for items matching search criteria. The items can then be reported or deleted using Microsoft Graph APIs. The script isn't a replacement for the Search-Mailbox cmdlet, but it does a reasonable job and is faster than compliance search purge actions. Above all, it's a learning exercise to discover the possibilities that exist with the combination of PowerShell, Graph APIs, and mailboxes.

 

https://practical365.com/mailbox-clean-up-script/

0 Replies