How to delete mailbox content
Hi guys, I have 11 mailboxes that i'd like to purge... delete all mailbox contents (mails, dates, etc... ) Does anyone have an idea? Before on exchange 2003 it was possible to create a policy and excute it... I've tried to create a policy in "managed folder mailbox policy" but I don't understand how to delete all mailbox contents in once time. Thanks, Lana
January 27th, 2010 2:07pm

Hi, You can user Export-Mailbox cmdlet to delete the contents of mailboxes. For multiple mailboxes... Pipe the mailbox list to Export-Mailbox. Get-content c:\11MailboxesList.txt | Get-mailbox | Export-Mailbox -DeleteContent -Reference:- http://msexchangeteam.com/archive/2006/11/28/431669.aspx Thanks. Vishal Ramnani MCITP - Exchange 2007, MCSE Messaging, MCTS - Win 2008 Config
Free Windows Admin Tool Kit Click here and download it now
January 27th, 2010 2:24pm

I've tried it... but it doesn't work... I have errors! I've tried ur command and i've also tried this one: Get-Mailbox David.Henry | Export-Mailbox -DeleteContent Export-Mailbox : Error was found for david henry (David.Henry@domain.com) because: Error occurred in the step: Moving messages. Failed to copy messages to the destination ma ilbox store with error: MAPI or an unspecified service provider. ID no: 00000000-0000-00000000, error code: -1056749164 At line:1 char:38 + Get-mailbox david.henry | Export-Mailbox <<<< -DeleteContent
January 27th, 2010 4:09pm

On Wed, 27-Jan-10 13:09:41 GMT, Lana_75 wrote:>I've tried it... but it doesn't work... I have errors! I've tried ur command and i've also tried this one: Get-Mailbox David.Henry | Export-Mailbox -DeleteContent Export-Mailbox : Error was found for david henry (David.Henry@exchange.france2.fr) because: Error occurred in the step: Moving messages. Failed to copy messages to the destination ma ilbox store with error: MAPI or an unspecified service provider. ID no: 00000000-0000-00000000, error code: -1056749164 At line:1 char:38 + Get-mailbox david.henry | Export-Mailbox <<<< -DeleteContent You need to run the export-mailbox from a machine that has 32-bit MAPIbits on it. Install the Exchange Management tools on a workstationthat has Outlook on it ad try running the export-mailbox from there.---Rich MatheisenMCSE+I, Exchange MVP --- Rich Matheisen MCSE+I, Exchange MVP
Free Windows Admin Tool Kit Click here and download it now
January 27th, 2010 8:01pm

You need to give full permissions on the mailbox that you are trying to purge to the user that you are running the powershell command as.
February 10th, 2010 8:49pm

I tried an other approach.The Mailbox in the database is linked to the AD Account with the msExchMailboxGuidSimply create a new GUID for that user.Sample Skript onhttp://www.msxfaq.net/tools/wipemailbox.htmThe user has a fresh new databasethe old mailbox will disappear after 30 days.here the scriptparam ( [string]$identity=$null )if ($identity -eq $null) { Write-Error "Please specify Mailbox Identity"}else { write-host "Given Identity : $identity" [string]$mailboxdn = (get-mailbox -identity $identity).distinguishedname write-host "Found MailboxUser: $mailboxdn" $user = [adsi]"LDAP://$mailboxdn" write-host "Bound AD-User :" $user.displayname $newguid = [guid]::NewGuid() write-host "Generated GUID :" $newguid $user.put("msexchmailboxguid",$newguid.tobytearray()) $user.setinfo() write-host "Generated GUID WRITTEN"}Exchange MVP
Free Windows Admin Tool Kit Click here and download it now
February 26th, 2010 4:39pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics