Forum Discussion

SidharthaR's avatar
SidharthaR
Copper Contributor
Aug 09, 2023

Is it possible to use PowerShell to delete emails from a specific folder of a user's mailbox?

All our users create a complex hierarchy of folders within their mailbox. While all new mail always comes into their Inbox, most users move the important email to specific folders. The emails accumulate in the folder and may need to be purged. Is it possible to use PowerShell to delete emails within a specified date range from a specific folder of a user mailbox without deleting emails in Inbox, Sent Items or any other folder?

Resources