Permanently delete a mailbox

[Cette rubrique est une documentation préliminaire et peut être modifiée dans les versions ultérieures. Des rubriques vides sont incluses comme espaces réservés. N’hésitez pas à nous transmettre vos commentaires. Envoyez-nous un e-mail à l’adresse ExchangeHelpFeedback@microsoft.com.]  

S’applique à :Exchange Online, Exchange Server 2016

Summary: Learn how to permanently delete a mailbox in Exchange 2016.

When you permanently delete active mailboxes and disconnected mailboxes, all mailbox contents are purged from the Exchange mailbox database, and the data loss is permanent. When you permanently delete an active mailbox, the associated Active Directory user account is also deleted.

An alternative to permanently deleting a mailbox is to disconnect it. After you disconnect a mailbox, by default, Exchange retains the data in the mailbox database for 30 days. This gives you the opportunity to reconnect or restore a mailbox before it’s purged from the database.

To learn more about disconnected mailboxes and perform other related management tasks in Exchange, see the following topics:

noteRemarque :
You can't use the Centre d’administration Exchange (EAC) to permanently delete an active mailbox or a disconnected mailbox.

  • Estimated time to complete: 2 minutes.

  • Des autorisations doivent vous être attribuées avant de pouvoir exécuter cette procédure. Pour voir les autorisations qui vous sont nécessaires, consultez "Recipient Provisioning Permissions" section in the Autorisations des destinataires topic.

  • Pour des informations sur les raccourcis clavier applicables aux procédures de cette rubrique, voir Raccourcis clavier dans Exchange 2013Raccourcis clavier dans le Centre d’administration Exchange.

tipConseil :
Vous rencontrez des difficultés ? Demandez de l’aide en participant aux forums Exchange. Visitez le forum à l’adresse : Exchange Server, Exchange Online ou Exchange Online Protection..

You can permanently delete an active mailbox in the Environnement de ligne de commande Exchange Management Shell.

Run the following command to permanently delete an active mailbox and the associated Active Directory user account.

Remove-Mailbox -Identity <identity> -Permanent $true
noteRemarque :
If you don’t include the Permanent parameter, the deleted mailbox is retained in the mailbox database for 30 days, by default, before it’s permanently deleted.

For detailed syntax and parameter information, see Remove-Mailbox.

To verify that you’ve permanently deleted an active mailbox, do the following:

  1. Verify that the mailbox is no longer listed in the EAC.

  2. Verify that the associated user account is no longer listed in Active Directory Users and Computers.

  3. Run the following command to verify that the mailbox was successfully purged from the Exchange mailbox database.

    Get-MailboxDatabase | Get-MailboxStatistics | Where { $_.DisplayName -eq "<display name>" }
    

    If you successfully purged the mailbox, the command won’t return any results. If the mailbox wasn’t purged, the command will return information about the mailbox.

There are two types of disconnected mailboxes: disabled and soft-deleted. You must specify one of these types when running the cmdlet to permanently delete the mailbox. If you specify a mailbox type that doesn't match the specific type of the disconnected mailbox, the command fails.

Run the following command to determine whether a disconnected mailbox is disabled or soft-deleted.

Get-MailboxDatabase | Get-MailboxStatistics | Where { $_.DisplayName -eq "<display name>" } | fl DisplayName,MailboxGuid,Database,DisconnectReason

The value for the DisconnectReason property for disconnected mailboxes will be either Disabled or SoftDeleted.

You can run the following command to display the type for all disconnected mailboxes in your organization.

Get-MailboxDatabase | Get-MailboxStatistics | Where { $_.DisconnectReason -ne $null } | fl DisplayName,MailboxGuid,Database,DisconnectReason
warningAvertissement :
When you use the Remove-StoreMailbox cmdlet to permanently delete a disconnected mailbox, all its contents are purged from the mailbox database and the data loss is permanent.

This example permanently deletes the disabled mailbox with the GUID 2ab32ce3-fae1-4402-9489-c67e3ae173d3 from mailbox database MBD01.

Remove-StoreMailbox -Database MBD01 -Identity "2ab32ce3-fae1-4402-9489-c67e3ae173d3" -MailboxState Disabled

This example permanently deletes the soft-deleted mailbox for Dan Jump from mailbox database MBD01.

Remove-StoreMailbox -Database MBD01 -Identity "Dan Jump" -MailboxState SoftDeleted

This example permanently deletes all soft-deleted mailboxes from mailbox database MBD01.

Get-MailboxStatistics -Database MBD01 | where {$_.DisconnectReason -eq "SoftDeleted"} | ForEach {Remove-StoreMailbox -Database $_.Database -Identity $_.MailboxGuid -MailboxState SoftDeleted}

For detailed syntax and parameter information, see Remove-StoreMailbox and Get-MailboxStatistics.

To verify that you’ve permanently deleted a disconnected mailbox and that it was successfully purged from the Exchange mailbox database, run the following command.

Get-MailboxDatabase | Get-MailboxStatistics | Where { $_.DisplayName -eq "<display name>" }

If you successfully purged the mailbox, the command won’t return any results. If the mailbox wasn’t purged, the command will return information about the mailbox.

 
Afficher: