Cleaning of my Exchange 2010 Mailboxes

Posted on 2013-06-02
Last Modified: 2013-06-25
Hi everybody,

For maintenance purposes, I need to empty all the mailboxes of my Exchange 2010 organisation.

For confidential reasons, I need that all the cleaned mails cannot be recovered, i want them to be definitively deleted.

How can I do ?


Question by:Admicom
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
LVL 19

Expert Comment

ID: 39214362
To empty all the mailboxes, you may have to user Exchange Powershell to delete the content of mailboxes.

To cleaned the mails, you can configure at Database level:

Deleted Settings:

Keep deleted items for (days) : 0

Author Comment

ID: 39214418
Thanks !

Before to do this, how can I automatize the export to PST files for all the mailboxes ?
LVL 19

Accepted Solution

suriyaehnop earned 500 total points
ID: 39214451

Import-CSV C:\filename | foreach {New-MailboxExportRequest -Mailbox $ -FilePath "\\SERVER01\PSTFileShare\$($"}

Open in new window

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now


Author Comment

ID: 39214562
i dont have SP1 and it does not work. The commands seem to be unknown. Do i have to deploy it before ?
LVL 19

Expert Comment

ID: 39214593

Exchange Server 2010 SP1
With the release of Exchange Server 2010 SP1 the export-mailbox cmdlet was replaced with new-mailboxexportrequest, it has similar requirements to export-mailbox, however it does not require Outlook to be installed.


Permissions assigned to user via RBAC
Exchange 2010 Management Tools Installed
.Net Framwork 3.5
PowerShell 3.5
Exchange Server 2010 Service Pack 1

If not SP1, you have to installed Outlook 64bit version on Exchange Mailbox  and use Export-Mailbox

Author Comment

ID: 39214880
Thks !

In fact I'd like a script that export all the mailboxes automatically...

Author Comment

ID: 39214954
When I try "export-mailbox" or "new-mailboxexportrequest", I have an error that tells me that the command is unknown. Would I have forgotten something ?
LVL 63

Expert Comment

by:Simon Butler (Sembee)
ID: 39214973
You really need to get your server up to date, as there are more modern commands and procedures with the later releases. RTM and SP1 are no longer supported, you need to be on 2010 SP2 or higher.

To use export-mailbox you have to be given specific permissions, being org admin or whatever is not enough. It is a specific permission. However I cannot recall what it is now as I don't retain knowledge of RTM/SP1 only commands.


Author Comment

ID: 39217444
Ok, great i managed to export all the mailbox.

Would you have the syntax to delete all the mails of a mailbox that are before the 1st of june 2013 for example ?

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
AddressList in EXCH2013 6 39
Exchange Server not available 42 69
Exchange Mail forwarding 9 43
Bulk export PST files in MS Exchange 2016 2 78
This article explains how to install and use the NTBackup utility that comes with Windows Server.
Many people use more than one email account and so it becomes difficult for them to manage them when they use separate accounts,  so, in this article, I have shared an easy way to add Other Mail Accounts in your Google Inbox. It helps to combine all…
To show how to create a transport rule in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Rules tab.:  To cr…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

738 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