Deleting a Mailbox
When you delete a mailbox, Exchange Online retains the mailbox and all its contents until the deleted mailbox retention period expires, which is 30 days. After 30 days, the mailbox is permanently deleted and can’t be recovered. The method for restoring a mailbox depends on whether the mailbox was deleted by deleting the Office 365 user account or removing the Exchange Online license. https://technet.microsoft.com/en-in/library/dn186233(v=exchg.150).aspx
To delete a Mailbox we will:
- Remove the License
- Once the license is removed the mailbox will move to soft deleted mailboxes (it can stay here for 30 days)
- The only option available here is “Restore”
- Run this command to get a list of soft deleted mailboxes: Get-Mailbox –SoftDeletedMailbox
- There are times that Admins would want to delete this too (I don’t know why) but if you want to delete the mailbox from here run the following command.
- Note: Once the mailbox is deleted from here it will be purged from the system and thus can’t be restored even if you want it.
- Make sure the user account is removed from Office 365 and from Deleted users
Remove-MsolUser -UserPrincipalName firstname.lastname@example.org
Remove-MsolUser -UserPrincipalName email@example.com -RemoveFromRecycleBin
Get-Mailbox -SoftDeletedMailbox -Identity firstname.lastname@example.org | Remove-Mailbox -PermanentlyDelete -IgnoreLegalHold
- Now the Soft Deleted Mailbox is gone