Delete All Calendar Entries In An Exchange 2010 Mailbox

A question came via email asking to help with deleting all calendar entries in an Exchange 2010 mailbox. Let’s find out how to do it.

The calendar in question had thousands of entries and hence the exchange admin wanted to clear it all using PowerShell. A one-liner will do the job, provided that you know how to filter the calendar entries alone in a mailbox ;)

This question came in response to my article about how to delete all items in the recoverable items folder in an Exchange 2010 mailbox. We will use the same cmdlet along with an advanced query syntax to filter only the calendar entries.

The command to run is as follows.

Search-Mailbox –identity username –SearchQuery kind:meetings –DeleteContent

You can get an estimate about the number of entries and size that will be freed up after deletion by running

Search-Mailbox –identity username –SearchQuery kind:meetings –EstimateResultOnly

Estimate meetings in a mailbox

Similarly, you can delete contacts, notes, tasks, im & emails by changing the search query.

Search-Mailbox –identity username –SearchQuery kind:contacts –DeleteContent

Search-Mailbox –identity username –SearchQuery kind:notes –DeleteContent

Search-Mailbox –identity username –SearchQuery kind:tasks –DeleteContent

Search-Mailbox –identity username –SearchQuery kind:im –DeleteContent

Search-Mailbox –identity username –SearchQuery kind:email –DeleteContent

Estimate im in a mailbox

Always use the EstimateResultOnly parameter first, before deleting the content. Just in case your query is not right ;)

SUBSCRIBE FOR DAILY ARTICLE UPDATES VIA EMAIL
Get the published articles delivered straight to your inbox. Your details will not be passed to any third party company.

Exchange Architect, Blogger, Husband & Dad. I have been in IT for the last 11 years, with Exchange Server becoming the prime area in the last few years. I am active on TechNet forums & Experts Exchange.

View all contributions by

  • How To Find Which Store Worker Process Is Responsible For A Mailbox Database In Exchange 2013

    Exchange 2013 has a new store named the Managed Store. In order to provide failure isolation in the database level in 2013, Microsoft has introduced two new processes as part of the managed store concept. First is the Store Worker Process(Microsoft.Exchange.Store.Worker.Exe) which does the same job that store.exe handled in previous versions. The only difference [...]

    Read More
  • Upload GAL Photos Using Exchange 2013 OWA Options (ECP)

    The “self service” option in OWA 2013 (ECP) has been enhanced with the option for uploading GAL photo by the end user. In Exchange 2010 ECP, end users were able to edit their contact details, address etc depending on the role assignment policy. In Exchange 2013 ECP ( OWA –> Options), the end user can [...]

    Read More
  • OWA 2013 Virtual Directory Displays The OWA Version As Exchange 2010

    A bug or typo in the code? While browsing the EAC, I noticed that the OWA virtual directory displays that the OWA Version as Exchange 2010 & not 2013. This happens in an Exchange 2013 only environment. The Shell displays the same info. MS, Is it a bug in the code or a typo?

    Read More
  • 2 Million Hits & 2.67 Million Page Views

    Yes, HowExchangeWorks has had 2 Million Hits & 2.67 Million page views so far! I take this opportunity to thank all my readers for your continuous support. I couldn’t have done this without you guys.

    Read More
  • Exchange 2013 Server Role Requirements Calculator v5.1

    Exchange Team has finally released the first public version of the 2013 Server Role Requirements Calculator. The name has been changed as the calculator now makes recommendations for both the Mailbox and CAS roles. If anyone out there is still confused, this is the 2013 equivalent of the 2010 Storage Calculator. The look and feel [...]

    Read More

0 comments… add one

Speak Your Mind…

Website Hits