Written by Tim on 09 October 2019

I recently had an issue where a mailbox had been deleted and the mail items hadn’t been backed up. Ok, no problem. Just restore this from the Recycle Bin using PowerShell. Well that’s what I thought, however it wasn’t there! Either it had gone past its 30 retention or someone had purged it manually via PowerShell.

After trying a few things on the client machine where the mailbox resided, all of which failed, I gave up and put this down as unrecoverable. I thought I’d raise it with Microsoft anyway to see if there was anything they could do (you never know, right?). A few hours later and they came back to me with a few PowerShell commands that worked!

How To Recover A Deleted Mailbox

First of all you need to find the GUID of the mailbox that has been deleted. To do this….

  • Get-RemovedMailbox

This will return a complete list of deleted users. It will look something like this…

Recover a deleted mailbox

You may see quite a few users in here, and it starts to look a bit messy. So you know, one user account starts from the ‘RunspaceID’ and ends at ‘ObjectState’. Once you’ve found your user, copy the GUID and run the following command…

New-Mailbox -Name “RecoveredMailbox@axon-it.com” -RemovedMailbox 288be5a5-c150-4191-8cc6-9dfd2602a9c3 –MicrosoftOnlineServicesID RecoveredMailbox@axon-it.com -Password (ConvertTo-SecureString -String ‘passw0rd’ -AsPlainText -Force)

This will create a new mailbox with the name of ‘RecoveredMailbox’ and restore all items from the deleted mailbox, which is also named ‘RecoveredMailbox’. Give your new mailbox the same name as the mailbox that was deleted. So if you’ve deleted a user named John Smith, then name the new mailbox John Smith. Simple!

You might be interested in

Don’t get fooled – how to spot a phishing attack

Cyber-attacks and data breaches can cause a lot of problems - business disruption, data loss, and financial hardship. Not to mention reputational damage. Safe to say, they’re a huge business risk and cause a whole lot of work you could do without.

Top 10 security deployment actions with Microsoft 365

Take these actions to strengthen security across your users, devices, apps and data. Take a look at our top 10 security deployment actions with Microsoft 365. If you need any help with your security give us a shout!

Working from home works for us

What a difference wfh makes for our team and the environment! Our team has been able to fit extra activities into their day including exercising, household chores, walking and gardening. Take a look at the other benefits they've found due to working from home.

Get ahead on tech transformation

Last month we tuned into the annual Microsoft Inspire event to find out what’s instore in the world of technology. As always Satya Nadella, CEO of Microsoft’s keynote was immense! He spoke about the huge impact of the pandemic on technology...