Read time 5 minutes

Looking to manage user mailboxes in Exchange Online within Office 365? You have two powerful options as your solution: the Microsoft 365 admin center and Windows PowerShell. But hold on, there’s more to it than just deletion.

When you delete a mailbox, the outcome depends on your chosen method. Deleting through the admin center or Exchange Management Shell cmdlets creates what’s known as a “soft-deleted user mailbox.” This mailbox takes up a temporary location in the Azure Active Directory Recycle Bin for under 30 days.

But it’s still a “soft-deleted mailbox” if the Azure Active Directory user account linked to it is soft-deleted. Go beyond that 30-day threshold or hard-delete the associated Azure Active Directory user, and you’ve got a “hard-deleted mailbox” on your hands. In other words, if that soft-deleted mailbox manages to survive the default 30-day retention or you manually delete it, it’s gone for good. For more insights, this blog will give you all the details on deleting the user mailboxes in Exchange Online.

Two ways to delete user mailbox in Exchange Online

You can delete Exchange Online user mailboxes in two different ways:

Delete an Exchange Online mailbox using Microsoft 365 admin center

The easiest method to delete a user-mailbox in Exchange Online is by using Microsoft 365 admin center.

If you delete a user account in Microsoft 365, the related mailbox from Exchange Online gets deleted. And the user account in Microsoft 365 gets listed in the Deleted Users page in Microsoft 365 admin center. This user mailbox can be recovered within 30 days. After this time exceeds, it gets permanently deleted and cannot be recovered.

This is how you can delete user mailboxes in Microsoft 365:

  1. Log in with your Microsoft 365 credentials. Click Admin.
    Log in Office 365 credentials
  2. Go to Users>Active Users. Select the user you want to delete. Then the select Delete user option to delete that particular user mailbox.
    Select the user you want to delete

Similarly, you can delete user mailboxes one by one. After deletion, to stop paying for the license assigned to the deleted user mailbox, you need to remove its license. To do this, go to Microsoft 365 admin center. Then, navigate to Billing>Subscriptions; select the subscription and then choose Add/Remove licenses to delete the license and stop paying for it.

Delete an Exchange Online mailbox using Windows PowerShell

You can permanently delete Exchange Online user mailboxes using Windows PowerShell:

  1. First, connect your Microsoft 365 account to Windows PowerShell by running the command.
    $UserCredential = Get-Credential
  2. A dialogue box pops up after the execution of this command. Enter the Microsoft 365 credentials and click OK.
    Enter Office 365 credentials
  3. Next, enter the following command for connection:
    $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
  4. Now run:
    Import-PSSession $Session -DisableNameChecking
  5. To delete a user mailbox, run:
    Remove-Mailbox -Identity <mailbox identity>

    To view the user profiles residing in your deleted folder (as it resides in the deleted folder for 30 days period), run the following command:

    Get-MsolUser – ReturnDeletedUsers

    Command to view user profiles in deleted folder

  6. To delete the user mailbox permanently (i.e. to remove from the Recycle Bin), execute the following command:
    Remove-MsolUser -UserPrincipalName <mailbox identity> -RemoveFromRecycleBin

    Command to delete the user mailbox permanently

Challenges of using PowerShell for deleting Exchange Online mailboxes

  • Permissions are a must when deleting Exchange Online mailboxes with PowerShell. ADManager Plus simplifies this by allowing users to perform this task without modifying privileges in specific OUs or domains.
  • PowerShell requires script execution knowledge, but ADManager Plus offers a user-friendly GUI, enabling easy management and reporting through simple clicks in its web-based console.
  • Bulk deletion with PowerShell means script modifications, whereas ADManager Plus provides a built-in option for bulk deletion by default.
  • PowerShell can be error-prone, with issues like misplaced hyphens, typos in LDAP names, or insufficient permissions causing problems. ADManager Plus eliminates these risks with its error-free GUI-driven actions.

Old and outdated user mailboxes are always undesirable and should be properly disposed of. These two easy methods provide solutions to get rid of unwanted data. If you want to back up your Exchange Online mailboxes before deleting them, trust Kernel Office 365 Backup and Restore tool. It is an advanced tool to backup Exchange/Microsoft 365 mailboxes effortlessly.

Conclusion

In summary, this article has provided valuable insights into the manual processes of soft and hard mailbox deletion in Exchange Online. While these methods are effective, it’s crucial to exercise caution and consider data safety. Therefore, it is highly recommended to back up your mailboxes before making any deletions.

For a secure mailbox backup solution, consider using Kernel Office 365 Backup & Restore tool. This powerful tool guarantees the protection of your valuable data, aligning perfectly with the mailbox management strategies discussed here. With us, you can confidently focus on mailbox management in Office 365 along with security of your organization’s critical information.

Kernel Office365 Backup
Related Posts