Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have a class/lab environment where the need arises to completely reset a user's mailbox, i.e. delete all mails, calendar items, ... and preferably do this via a script, whether it be in wsh or powershell or something else doesn't really matter.

My colleague attempted this in the past, but it required him to delete the mailbox, and then adjust settings in the registry somewhere to reflect the new unique id of the mailbox so this was too troublesome to do.

Our environment is an Exchange 2007 server in a mostly Win2003 domain (2003 DC's)

EDIT: I'd like to stress that everything from the "profile" should get removed, including calendar items and tasks!

share|improve this question
up vote 2 down vote accepted

Try the Export-Mailbox cmdlet with the -DeleteContent switch parameter.

share|improve this answer
This only removes the mails, doesn't it? Or am I misinterpreting the knowledgebase you linked – HannesFostie Jul 13 '10 at 13:40
From the KB article: "The Export-Mailbox cmdlet exports all message types, including messages, calendar items, contacts, distribution lists, journal entries, tasks, notes, and documents." – sysadmin1138 Jul 13 '10 at 15:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.