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:
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:
Now we can import the session we created earlier:
Finally we can use the following syntax to restore our Shared mailbox. Just change firstname.lastname@example.org to your Shared Mailbox email address from the example below:
Undo-SoftDeletedMailbox -SoftDeletedObject email@example.com
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…