Export-Mailbox delete content not working
We're using Exchange 2007 SP1 Rollup 9. When I export from a mailbox using the Export-Mailbox cmdlet none of the items I export get deleted even though I use the -deletedcontent switch.Here is the command we're using - Export-Mailbox Identityuser@domain.com -DeleteContent -StartDate "12/01/2008" -EndDate "12/08/2008" -PSTFolderPath "\\server\folder\pstfile.pst" -BadItemLimit 10000 We've exported/deleted correctly a number of times last year, but something has changed and we are unable to get the command to delete the content.Thanks,Chris
August 5th, 2009 7:25pm

Do you get any error or it just finishes without any error? There was a bugwhile exporting more than 5000 items with deletion but it has addressed in UR8... You can also try by adding -Verbose and -Debug switches and try to see if you get any error. Like below cmdlet... Export-Mailbox Identityuser@domain.com-DeleteContent -StartDate "12/01/2008" -EndDate "12/08/2008" -PSTFolderPath "\\server\folder\pstfile.pst" -BadItemLimit 10000-Verbose -DebugAmit Tank | MVP Exchange Server | MCITP: EMA | MCSA: M | http://ExchangeShare.WordPress.com
Free Windows Admin Tool Kit Click here and download it now
August 5th, 2009 7:35pm

No, there isn't an error message, but I usually stop the export because the PST file will get up to 20 GB. I'll try exporting with those switches. The cmdlet also doesn't observe the end date. So I stated it should stop after 1 week from the beginning date and I just opened a file that was created and it has information for 04/2009 which is beyond the end date.Thanks
August 5th, 2009 7:47pm

Does the issue happen to other users as well? Please also check if theres any related event in the application log after reproduced the issue
Free Windows Admin Tool Kit Click here and download it now
August 6th, 2009 6:49am

I ended up contacting Microsoft directly. A couple ofthings I didn't know or couldn't find.1) Export-mailbox is heavily dependent on Outlook. We are trying to export our jounaling user mailbox. It has a large number of items in the box and the mailbox size is huge.2)We had to add these keys to the registry MaxLargeFileSize REG_DWORD 0x00000001 0x00005000 0x00005000 20,480 (20 GB) Outlook 2007 HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\12.0\Outlook\PST The user preference location for the registry entries is located in the following path in Registry Editor: HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Outlook\PST Per the below article:http://support.microsoft.com/kb/8329253) The export-mailbox command exports the entire mailbox after your start date no matter what you put as the end date. The command will only clean out the items AFTER it has finished. So we used 12/01/08(start) - 12/31/08(end) The command exported all of the mailbox including 2009 to a PST. You then have to go back and compact the PST to get the PST file size back down to a normal size.4) Export-mailbox only marks the items for delete it doesn't actually delete them. so "-deletecontent" only marks it for deletion. Your mailbox retention schedule will delete the actual emails. Default is 30.We're not finished with the issues, but that's what I've learned so far.
August 13th, 2009 1:12am

Great! Thanks for sharing such valuable knowledge at here, please post at here if theres any more update Thanks!
Free Windows Admin Tool Kit Click here and download it now
August 13th, 2009 4:23am

Thanks for the sharing this conclusion Chris.Appreciate it... :)Amit Tank | MVP Exchange Server | MCITP: EMA | MCSA: M | http://ExchangeShare.WordPress.com
August 13th, 2009 11:44am

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

Other recent topics Other recent topics