Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 383
  • Last Modified:

How to remove all content from exchange database without removing the mailboxes themselves

I have a working SBS 2011 (exchange 2010) environment that i wish to remove ALL content from the exchange database. I do need to keep the existing user accounts/user mailboxes so we can continue to receive emails (to a new or cleaned database)
The business is changing hands and as a result i need to remove all existing exchange content as new owners want to start from fresh.
0
scottics
Asked:
scottics
  • 2
  • 2
  • 2
2 Solutions
 
MASTechnical Department HeadCommented:
If you want to create a new database. Just create a new database and move all active mailboxes(including system mailboxes)  and delete the old database
Please check this
http://social.technet.microsoft.com/wiki/contents/articles/13919.how-to-remove-default-database-in-exchange-2010-in-a-recommended-way.aspx
0
 
LeeDerbyshireCommented:
It's not something I've ever heard of anyone having to do before, and it's not something one can easily test :)  But you could possibly do something like

Get-Mailbox -ResultSize Unlimited | Export-Mailbox -DeleteContent
0
 
scotticsAuthor Commented:
Mas,
Will moving all active mailboxed bring over the emails within those boxes?
End result i need empty mailboxes, no archives, no recoverable items etc. just the mailbox itself.

LeeDerbyshire,
I will need to look into this option, i am not an exchange guru so need to investigate this command further.
I need a clean database, no emails, no calendars, nothing that was stored in original exchange database and log files.
Someone suggested
1.      Dismount databases
2.      Delete the EDB and LOG files
3.      Fire them back up to create blank new databases and empty mailboxes and you are ready to go
Not sure if this would work. Are mailboxes automatically created from AD users when a new database is created.
0
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

 
LeeDerbyshireCommented:
I didn't think that deleting the files would work, but I tried it here, and it does. One thing to note, though, is that the directory structure needs to be in place, so if your DBs are in a folder named MBX (for example), you could rename it to MBX.old (I'd suggest not deleting them. Not yet.), and then create a new MBX folder.

This is something you could try for yourself. Create a new temporary test database, put one or more test mailboxes in it, and create some items in it. Take the database offline, rename the folder and create a new empty one. Then bring the DB back online. Log into the mailbox to make sure it's now empty.

If you have time, you might want to do more extensive testing to make sure that you are not going to lose anything else. There are some hidden items stored inside the mailboxes. People's Out-of-office auto-reply messages, Rules, Outlook view settings, OWA locale settings, and things like that. They will have to recreate all these.
0
 
scotticsAuthor Commented:
You both put me on the right track, Regards,

Scott
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 2
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now