Read time: 6 minutes

Summary: Using Exchange Management Shell (EMS) and Exchange Admin Center (EAC), one can easily disable or delete an Exchange mailbox. However, before you delete or disable the mailboxes, make sure to back them up with native methods or a professional Exchange backup tool.

Encountering scenarios where two similar mailboxes coexist within the same Exchange Database is quite common in an Exchange server environment. Typically, one mailbox is actively used while the other lies dormant. Admins often search and delete these redundant mailboxes using the “remove-mailbox” cmdlet. It’s vital to note that when you delete a mailbox from the Exchange database, the associated user information is also removed from the Active Directory. Therefore, if your intention is solely to deactivate the user’s mailbox, you should opt to disable it instead.

Things to do before you delete or disable the Exchange mailbox

You need to do the following task before you can manipulate the mailboxes.

  • Permission: You must have the “Mail Recipients”, or “Organization Management” roles assigned.
  • Backup: Before you delete the mailbox, back up or archive it with EAC or EMS cmdlets. Alternatively, use an EDB to PST converter tool to export the mailboxes.

Disable or Delete User Mailbox in Exchange Database

Let’s see how you can use the EAC or the EMS to manage your Exchange Server mailbox.

Disable Mailbox using Exchange Admin Center

For temporary mailbox deactivation, follow these steps:

  1. Log in to the Exchange Admin Center with the Administrator credentials.
  2. Under recipients, go to mailboxes, select the user mailbox to be disabled, click more (•••), and click Disable.Exchange Admin Center
  3. A warning message will appear. Click Yes.warning message appear
  4. The user mailbox will disappear from the list. After the expiry of the retention period, the mailbox will be deleted permanently.mailbox deleted

Disable Mailboxes using Exchange Management Shell

Run this command to disable a mailbox:

Disable-Mailbox <MailboxName>Exchange Management Shell

When you run the command, it will ask you to confirm your action. After confirmation, it will delete the mailbox.

Delete a mailbox with Exchange admin center

Here is a step-by-step process for deleting an Exchange Server mailbox:

  1. Login to EAC using the administrator credentials and then go to Recipients.
  2. Select the type of mailboxes from the list:
    1. Mailboxes: user and linked mailboxes
    2. Resources: equipment mailboxes
    3. Shared: shared mailboxes
    4. Public folder: public folder mailboxes
  3. Find and select the mailbox(s) you want to delete from the list of mailboxes.
  4. After choosing the mailboxes, click Delete and Yes in the warning message dialog box.

Delete a single mailbox from the Exchange Server

Use the following cmdlet to delete a single mailbox from Exchange Server:

Remove-Mailbox [-Arbitration] [-PublicFolder]

Note: Check the retention period using the following command:

Get-MailboxDatabase | FL -Property PSComputerName,MailboxRetention

Delete multiple mailboxes from the Exchange Server

Use the given command to delete inactive mailboxes from the database:

Get-Mailbox -ResultSize Unlimited –RecipientTypeDetails UserMailbox,SharedMailbox | Where {(Get-MailboxStatistics $_.Identity).LastLogonTime -lt (Get-Date).AddDays(-90)} | Remove-Mailbox -whatif

Note: This script removes all the inactive mailboxes that have been inactive for more than 90 days of duration.

Comparison | Disable Mailbox vs Delete Mailbox

Understand the basic difference between deleting and disabling an Exchange mailbox.

  Disable Mailbox Delete Mailbox
Active Directory User Preserved (Account remains active Deleted (Account is removed from AD)
Mailbox State Disconnected (Soft-linked) Disconnected (Orphaned)
Recovery Difficulty Easy (reconnect to the existing user) Hard (must restore AD user first)
Use Case Employee leave of absence or role change Employee permanent departure

How to delete a disconnected mailbox permanently?

All the disabled and soft-deleted mailboxes are known as disconnected mailboxes. You can either reconnect or permanently delete the disconnected mailboxes. The Exchange Management Shell script mentioned below will help to identify if the disconnected mailbox belongs to the soft-deleted or disabled category.

$dbs = Get-MailboxDatabase $dbs | foreach {Get-MailboxStatistics -Database $_.DistinguishedName} | where {$_.DisplayName -eq “”} | Format-List DisplayName,MailboxGuid,Database,DisconnectReason

Use the following cmdlet to delete disabled mailbox permanently

Remove-StoreMailbox -Database MBD55 -Identity “2ab56ce7-afc8-3343-8996-d87e3fe189c3” -MailboxState Disabled

Use the following cmdlet to delete soft-deleted mailbox(es) permanently:

Remove-StoreMailbox -Database MBD55 -Identity “Alex Johnson” -MailboxState SoftDeleted

How to recover a deleted mailbox?

Recovering a deleted Exchange mailbox is a common occurrence for admins managing large enterprise Exchange environments. You can recover the lost data either using the native methods or a dedicated Exchange Server mailbox recovery tool. I usually prefer the manual method when my Exchange database is healthy, and the removed mailbox is within the retention period.

But if your database is dismounted, inconsistent, or corrupt, the native ways will not work. In such a case, you must use a professional Exchange recovery tool. A specialized tool will help with granular-level mailbox recovery.

I personally use and recommend the Kernel for Exchange Server software for easy and accurate recovery of deleted mailboxes. You can use it for any Exchange Server version.

Conclusion

Disable an Exchange mailbox for scenarios like employee transfer or database maintenance. Choose to permanently delete the mailbox for events like duplicate mailboxes. Moreover, if your main concern is to free up storage, you can directly export EDB to PST file and archive it on your local PC.

Frequently Asked Questions

Q. Does deleting a mailbox immediately free up space on the Server?

Ans. No, the deleted data stays until the retention period is over. Moreover, the deleted space is marked as “White Space”, and to reclaim the free space, you must defragment the database.

Q. How to transfer an offline EDB file to an active Exchange Server?

Ans. To migrate EDB to Live Exchange Server, you must use a professional EDB migration tool since no reliable manual method is available.

Q. How to recover mailboxes from a corrupt EDB file?

Ans. To regain access to your emails, you must repair EDB files. For the repair, you can either use the eseutil tool or use our Exchange recovery tool.

Kernel for Exchange Server
Related Posts