Forum Discussion
ADumith
Feb 15, 2023Iron Contributor
Search and delete emails content
Hello everyone, I need to develop a script to maintain the mailboxes of my users when they are over quota. I had found this: Search-Mailbox myTarget -SearchQuery '(recieved<02/01/2003) AND (...
VasilMichev
Feb 16, 2023MVP
The cmdlet is still available and works fine, and it's faster/more convenient than the "replacement" New-ComplianceSearch one. But in your scenario, it's probably easier if you just stamp a retention policy on the mailbox: https://learn.microsoft.com/en-us/exchange/security-and-compliance/messaging-records-management/retention-tags-and-policies