Delete content of mailboxes

Posted on 2012-09-18
Last Modified: 2012-09-18

We have splitted away from our parent company which hosted our former mailboxes under our old e-mail address domain (e.g. During a period of time, we have an e-mail forwarding from to
However, as this forwarding is already in effect and we have migrated the content of the mailboxes we wish to delete the content of these mailboxes.

How can we do this centrally in a easy and effective way?

It's important that we do not delete the e-mail forwarding (which is done by "Mail flow"), but only the data (e-mails, calendar and contacts).
Question by:jeliasson
    LVL 12

    Expert Comment

    LVL 12

    Accepted Solution

    To summarise,

    First run the following 2 commands:
    New-RoleGroup -Name "Exchange Mailbox Import Export" -Roles "Mailbox Import Export" -Members "domain\username" -DisplayName "Exchange Mailbox Import Export" -Description "This group will provide access to mailbox import and export cmdlets within entire Exchange Organization."

    New-RoleGroup -Name "Exchange Support Diagnostics" -Roles "Support Diagnostics" -Members "domain\username" -DisplayName "Exchange Support Diagnostics" -Description "This group will provide access to support diagnostics cmdlets within entire Exchange Organization."

    (replace "domain\username" with the user that will be carrying out the task.)

    Close and reopen EMS to ensure the search-mailbox cmdlet is loaded.
    Finally, run:
    get-mailbox | search-mailbox -deletecontent -force
    LVL 1

    Author Closing Comment

    Thank you very much!

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
    Local Continuous Replication is a cost effective and quick way of backing up Exchange server data. The following article describes the steps required to configure Local Continuous Replication. Also, the article tells you how to restore from a backup…
    This tutorial will walk an individual through locating and launching the BEUtility application and how to execute it on the appropriate database. Log onto the server running the Backup Exec database. In a larger environment, this would generally be …
    In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now