Deleting the Wrong Mailbox in Exchange Server 2007 – And Restoring It

Tech Supporton April 30th, 201011 Comments

So, it was bound to happen… We removed the wrong user’s mailbox in Exchange Server 2007 today.  Unfortunately, with Server 2007, removing an account, removes the Windows user object and also marks the mailbox in the database for removal.  Luckily, there is a relatively quick fix:

  1. Restore the Active Directory object with the AdRestore utility
  2. Connect the disconnected mailbox to the restored user account

Step 1
First, we downloaded the AdRestore program from Microsoft onto our primary Active Directory server and then ran the command:

> adrestore -r username

The program searches through recently deleted (tombstoned) objects and allows you to recover them.  The username part works as a rudimentary search.  If it finds the object, it prompts you to proceed.  Once you do, the account is restored.  It’s disabled and doesn’t have a password, so you’ll need to set the password and the activate the account. Microsoft has a long drawn-out article on restoring Active Directory accounts, but running this simple tool seemed to work fine for us.

Step 2
In the Exchange Management Console, we went to Recipient Configuration -> Disconnected Mailbox and went to find the deleted mailbox.  Oh crap! It wasn’t there!  Luckily, it turns out that if the mailbox management process has not yet run, you will not see recently deleted mailboxes.  Fortunately, you can force this by going to the Exchange Management Shell and running:

> clean-mailboxdatabase “Mailbox Database

After running this command, the disconnected mailbox now appeared.  You then right-click on it, and select “Connect…”  Check “User Mailbox” and click Next.  Then, select “Existing User,” browse to find the user, make sure their Alias is correct, and click Next. Clicking Finish reconnects the user’s old mailbox to the restored user account.

The reconnection looked like it finished quickly, but we found that it took about an hour for it to fully connect and allow the user access to her email again.  Hope this helped!

Post comment as twitter logo facebook logo
Sort: Newest | Oldest

Thank you very much. These instructions were nice and simple to follow and did the trick.

It also seems to restore the deleted account successfully here, but i wonder where it end up.. I cant find the acccount anywhere in my AD.. Not even a search for it helps.. any suggestions ? Gman

Great article! Thanks for that!

Great article, just saved my ass. Thanks :)

I have the retension set to 30 days, but my deleted mailbox will not show up in the disconnected mailbox container. Yes, I attached to the correct server (the only exchange in the org) and yes, I ran the clean command. Any ideas? Or am I going to have to restore from backup.

I can't express how grateful I am for this - I've been going nuts because a deleted mailbox wasn't appearing in the 'Disconnected Mailboxes' list, thank you for the "clean-mailboxdatabase “Mailbox Database“" command!

Glad it helped. It's a bit of a scare when the mailbox is not there!

Thank you so much for this! I was going nuts because the mailbox wasn't listed under Disconnected Mailbox, none of the other sites I read said anything about running clean-mailboxdatabase.

Great Great article, thank. Got me out of a very sticky spot

Great article, I had to restore 3 users that were deleted by accident and this totally helped.

Extremely helpful tool and excellent tutorial. Running ADRestore -r seemed to have restored the object, although I'm not able to find it in ADUC.