Jump to content

Office 365, delete emails older than x days from a users mailbox - powershell script


Recommended Posts

Posted

If it's just from their inbox, you can set a mailbox retention rule to remove mail over X days.

It does not affect items in sub folders from our testing (since we're rolling out 1 year retention policy for staff at the start of the new year)

Posted
Thanks, I only need to delete the emails from their inbox, so will keep searching for a solution.

 

Should be use Get-MailboxFolder User:\Inbox to target search to just inbox. I will have a look if I can knock something up when I get 5 mins.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...