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

Great expectations: Making hybrid working work

We’ve been on the cusp of the shift to hybrid working for more than a year, with false starts along the way – due to the pandemic – having other ideas. Now, we’re at a long-awaited inflection point – the lived experience of hybrid working.

Get connected with Microsoft Dynamics

Struggling to find a CRM which fits all your needs? Take a look at the benefits and features of Microsoft Dynamics below…

A simpler way to manage identities

Be honest – do the individuals in your team all use the same password(s)? Did you know that 80% of data breaches are traced back to weak passwords; or that, on average, thirty accounts with passwords are needed per person? It’s a lot, isn’t it?!

Microsoft 365 Hidden Features

Do you have a Microsoft 365 license? So many of us do and yet most of us only make use of part of our license.