M365 Restore Deleted Shared Mailbox

Just a brief post today to outline how to restore a deleted Shared mailbox as opposed to a deleted standard user.

Even though a Shared Mailbox is listed in the Deleted Users group in the M365 Admin Center, you'll find if you try and restore it using the Restore User option, it will fail.

The only option is to use PowerShell. Let's start...

Open PowerShell in admin mode and carry out the following command:

Import-Module MsOnline

Now we're going to logon to our M365 Tenant using our admin credentials after running the following command:

$LiveCred = Get-Credential

Once we've successfully logged on we'll create a new session: (All one line, there should be no line breaks in the syntax below):

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection

Next we'll set the execution policy using the syntax below:

Set-ExecutionPolicy Unrestricted

Now we can import the session we created earlier:

Import-PSSession $Session

Finally we can use the following syntax to restore our Shared mailbox. Just change [email protected] to your Shared Mailbox email address from the example below:

Undo-SoftDeletedMailbox -SoftDeletedObject [email protected]

Now you can go to your M365 Admin Portal and your restored mailbox should be displayed in the Shared Mailboxes group.

That's it, your task is complete...

If you've found this useful, you may want to sign up to our newsletter where you'll receive notices on when we post new articles and helpful "how tos". Just fill out your details below and we'll do the rest…

No Comments Yet.

Leave a comment


Sign up to our newsletter where you’ll receive notices on when we post new articles and helpful “how tos” to make your IT life easier.