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-MsolUser -UserPrincipalName user@domain.com

Remove-MsolUser -UserPrincipalName user@domain.com -RemoveFromRecycleBin

 

Get-Mailbox -SoftDeletedMailbox -Identity user@domain.com | Remove-Mailbox -PermanentlyDelete -IgnoreLegalHold