Disable or delete a mailbox
Applies to: Exchange Server 2013 SP1
You can use the EAC or the Shell to disable or delete a mailbox in Exchange 2013. When a mailbox is disabled or deleted, Exchange retains the mailbox in the mailbox database and switches the mailbox to a disabled state. Disabled and deleted mailboxes are retained in the mailbox database until the deleted mailbox retention period expires, which is 30 days by default. After the retention period expires, the mailbox is permanently deleted or purged.
If you need to delete a mailbox in Exchange Online, see Delete or restore user mailboxes in Exchange Online.
Note
Disabled or deleted mailboxes are referred to as disconnected mailboxes.
The primary difference between deleting and disabling a mailbox is that when you disable a mailbox, the Exchange attributes are removed from the corresponding Active Directory user account, but the user account is retained. When you delete a mailbox, both the Exchange attributes and the Active Directory user account are deleted. This difference also determines your options to reconnect or restore disabled and deleted mailboxes.
The following table shows which types of Exchange mailboxes you can disable and delete.
Mailbox type | Disable? | Delete? |
---|---|---|
Archive mailbox | Yes | No* |
Linked mailbox | Yes | Yes |
Resource mailbox (Room or Equipment) | No | Yes |
Shared mailbox | Yes | Yes |
User mailbox | Yes | Yes |
* If an archive mailbox is enabled, it will be deleted when the primary mailbox is deleted. For information about disabling archive mailboxes, see Manage In-Place Archives in Exchange 2013.
If an administrator deletes a user account that has a mailbox, the Exchange Information store will eventually detect that the mailbox is no longer connected to a user account and mark that mailbox for deletion, even if the mailbox is on hold. If you want to retain the mailbox you must do the following:
Instead of deleting the user account, disable the user account.
Change the properties of the mailbox to restrict its use and access to the mailbox. For example, set send and receive quotas equal to 1, block who can send messages to the mailbox, and restrict who can access the mailbox.
Retain the mailbox until all data has been expunged, or until hold is no longer required.
For additional management tasks related to disconnected mailboxes, see the following topics:
- Disconnected mailboxes
- Connect a disabled mailbox
- Connect or restore a deleted mailbox
- Permanently delete a mailbox
What do you need to know before you begin?
Estimated time to complete each procedure: 2 minutes.
You need to be assigned permissions before you can perform this procedure or procedures. To see what permissions you need, see the "Recipient Provisioning Permissions" section in the Recipients Permissions topic.
For information about keyboard shortcuts that may apply to the procedures in this topic, see Keyboard shortcuts in the Exchange admin center.
Tip
Having problems? Ask for help in the Exchange forums. Visit the forums at Exchange Server.
Disable a mailbox
As previously stated, when you disable a mailbox, the Exchange attributes are removed from the corresponding Active Directory user account, but the user account is retained.
Use the EAC to disable a mailbox
The following procedure shows how to disable a user mailbox. Use the same procedure to disable other mailbox types after navigating to the appropriate page in the EAC.
In the EAC, navigate to Recipients > Mailboxes.
In the list of user mailboxes, click the mailbox that you want to disable.
Click More and then click Disable.
A warning appears asking if you're sure you want to disable the mailbox. Click Yes to disable the mailbox.
The mailbox is removed from the mailbox list.
Use the Shell to disable a mailbox
Use the following command to disable user mailboxes, linked mailboxes, resource mailboxes, and shared mailboxes.
Disable-Mailbox <identity>
When you run this command, a message is displayed that asks you to confirm that you want to disable the mailbox.
Here are some examples of commands for disabling mailboxes.
Disable-Mailbox danj
Disable-Mailbox "Conf Room 31/1234 (12)"
Disable-Mailbox sharedmbx@contoso.com
How do you know you've successfully disabled a mailbox?
To verify that you've successfully disabled a mailbox, do one of the following:
In the EAC, click Recipients, navigate to the appropriate page for the mailbox type that you disabled, and then verify that the mailbox is no longer listed.
In Active Directory Users and Computers, right-click the user account whose mailbox you disabled, and then click Properties. On the General tab, notice that the E-mail field is blank. This verifies that the mailbox is disabled, but the user account still exists.
In the Shell, replace <DisplayName> with the display name of the mailbox and run the following commands.
$dbs = Get-MailboxDatabase $dbs | foreach {Get-MailboxStatistics -Database $_.DistinguishedName} | where {$_.DisplayName -eq "<DisplayName>"} | Format-List DisconnectReason,DisconnectDate
The
Disabled
value in the DisconnectReason property indicates that the mailbox is disabled.Note
When you delete a mailbox, the value in the DisconnectReason property is also
Disabled
. However, the corresponding Active Directory user account is deleted.In the Shell, run the following command.
Get-User <identity>
Note that the value for the RecipientType property is
User
, instead ofUserMailbox
, which is the value for users with enabled mailboxes. This also verifies that the mailbox is disabled, but the user account is retained.
Delete a mailbox
As previously stated, when you delete a mailbox, both the Exchange attributes and the Active Directory user account are deleted. The mailbox (and the archive mailbox, if it's enabled) will be permanently deleted from the mailbox database after the mailbox retention period expires.
Use the EAC to delete a mailbox
The following procedure shows how to delete a user mailbox. Use the same procedure to delete other mailbox types after navigating to the appropriate page in the EAC.
In the EAC, navigate to Recipients > Mailboxes.
In the list of user mailboxes, click the mailbox that you want to delete, and then click Delete .
A warning appears asking if you're sure you want to delete the mailbox. Click Yes to delete the mailbox.
The mailbox is removed from the mailbox list.
Use the Shell to delete a mailbox
Use the following command to delete user mailboxes, linked mailboxes, resource mailboxes, and shared mailboxes.
Remove-Mailbox <identity>
When you run this command, a message is displayed that asks you to confirm that you want to remove the mailbox and the corresponding Active Directory user account.
Here are some examples of commands for deleting mailboxes.
Remove-Mailbox pilarp@contoso.com
Remove-Mailbox "Fleet Van (16)"
Remove-Mailbox corpprint
How do you know you've successfully deleted a mailbox?
To verify that you've successfully deleted a mailbox, do one of the following sets of verification procedures.
In the EAC, click Recipients and then navigate to the appropriate page for the mailbox type that you deleted, and verify that the mailbox is no longer listed.
In Active Directory Users and Computers, verify that the corresponding user account is no longer listed.
Or
In the Shell, replace <DisplayName> with the display name of the mailbox and run the following commands to verify that the mailbox has been deleted.
$dbs = Get-MailboxDatabase $dbs | foreach {Get-MailboxStatistics -Database $_.DistinguishedName} | where {$_.DisplayName -eq "<DisplayName>"} | Format-List DisconnectReason,DisconnectDate
The
Disabled
value in the DisconnectReason property indicates that the mailbox has been deleted.Note
When you disable a mailbox, the value in the DisconnectReason property is also
Disabled
. However, the corresponding Active Directory user account is retained.Run the following command to verify that Active Directory user account has been deleted.
Get-User <identity>
The command will return an error stating that user couldn't be found, verifying that the account was deleted.