Exchange 2007

fastadvice
fastadvice used Ask the Experts™
on
How do i delete all emails from one mailbox and is there any software that can do this using a gui, seems like a painful process to carry out a simple job
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
You can use the Export-Mailbox cmdlet with the -deletecontent switch;
https://technet.microsoft.com/en-us/library/aa998579.aspx

Author

Commented:
Whats the export cmdlet for when i want to delete
Scott CSenior Engineer

Commented:
Try this....

Get-Mailbox -Database DB1 | Export-Mailbox -TargetMailbox ExportMailbox  -DeleteContent

If that doesn't do it look through the above article.
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Author

Commented:
which bit should i exchange for the mailbox name
Scott CSenior Engineer

Commented:
The name of the mailbox.
Exchange Experts
Commented:
Get-Mailbox -Identity dschatz | Search-Mailbox -ContentFilter {((Received -lt ’12/06/1990') -and (Received -ge ’04/01/2013'))} -DeleteContent -force

OR

Use the following command below which will delete all email for mailbox in your Exchange environment up until September 18th 2015.

search-mailbox -identity <username> -SearchQuery "Received:<$('18/09/2015')" -deletecontent

Also

You can delete e-mails using auto archive option available in outlook

Click the File tab.

Click Options.

Click Advanced.

Under AutoArchive, click AutoArchive Settings.

Select the Run AutoArchive every n days check box, and then specify how often to run AutoArchive.

Select any other options that you want. You can choose to have old items deleted automatically at AutoArchive.

Author

Commented:
If you have several mailboxes with the same name how do you find its identifier

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial