Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Exchange2016 restore disconnected mailboxes, restore disabled mailboxes

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Summary

Disconnected mailboxes are mailbox objects in Exchange stores that are not associated with Active Directory user accounts. The fractured mailbox remains in the Exchange database, and the retention time is specified in the deleted mailbox retention settings of the mailbox database. By default, disconnected mailboxes are retained for 30 days. During this retention period, connecting a mailbox to a new or existing Active Directory user account can recover the mailbox.

There are two types of disconnected mailboxes:

When a soft-deleted mailbox moves a mailbox from the Microsoft Exchange Server 2010 Service Pack 1 (SP1) database to any other database, Exchange does not completely delete the mailbox from the source database after the move is complete. Instead, the mailbox in the source mailbox database is switched to the soft delete state. With soft delete mailboxes, you can use the MailboxRestoreRequest cmdlet set to access mailbox data during a mailbox restore operation. The soft delete mailbox remains in the source database until the deleted mailbox retention period expires or until the mailbox is cleared using Remove-StoreMailbox cmdlet. Disabled mailboxes when you use Disable-Mailbox or Remove-Mailbox cmdlet to disconnect or delete a mailbox, Exchange retains the deleted mailbox and the mailbox switches to the disabled state. Disabled mailboxes allow you to recover mailbox data without having to restore the entire mailbox database. Disabled mailboxes remain in the mailbox database until the deleted mailbox retention period expires or until the mailbox is permanently deleted.

No matter which way to restore the mailbox, the premise is to ensure that the user account exists in the AD.

Restore soft deleted mailboxes

1. To restore the soft deleted mailbox Exchange user mailbox, you need to know the account "display name (DisplayName) and the database where the mailbox is located (Database). You need to use the following command."

This command is used to query disconnected mailboxes and display basic information named Yang Yuanzhu. If you need more precise DisplayName query, you can replace-like with-eq.

Get-MailboxDatabase | Get-MailboxStatistics | Where {($.DisconnectReason-eq "Disabled")-and ($.DisplayName-like "XXX*")} | fl DisplayName,Database

2. If the query fails to update the mailbox status in the following ways, you need to update the mailbox status of all disconnected mailboxes on the mailbox database.

The script is as follows (Note: use Clean-MailboxDatabase-database "name" in the old version of exchange2010, but the new version is more troublesome)

$database=Get-MailboxDatabase |% {$.name}

Foreach ($DB in $database)

{

Get-MailboxStatistics-Database $DB | Where {$.DisconnectReason-ne $null} | ForEach {Update-StoreMailboxState-Database $.Database-Identity $.MailboxGuid-Confirm:$false}

}

3. Use the "New-MailboxRestoreRequest" command to restore the user mailbox; the parameter after-SourceStoreMailbox is the mailbox's GUID;-SourceDatabase; the parameter after-TargetMailbox is the database where the mailbox is located; the parameter after-mailbox is to restore the user mailbox name

This example restores the source mailbox on the mailbox database DB21 with the name XXX to the mailbox of XXX.

New-MailboxRestoreRequest-SourceDatabase "DB12"-SourceStoreMailbox "XXX"-TargetMailbox XXX

Restore disabled or deleted mailboxes

1. To restore the disabled or deleted mailbox Exchange user mailbox, the database (Database) where the mailbox is located, you need to use the following command.

This command queries disconnected mailboxes to display the database where the mailbox named ea02.srv is located

Get-MailboxDatabase | Get-MailboxStatistics | Where {($.DisconnectReason-eq "Disabled")-and ($.DisplayName-eq "XXX")} | fl Database

2. If the query fails to update the mailbox status in the following ways, you need to update the mailbox status of all disconnected mailboxes on the mailbox database.

The script is as follows

$database=Get-MailboxDatabase |% {$.name}

Foreach ($DB in $database)

{

Get-MailboxStatistics-Database $DB | Where {$.DisconnectReason-ne $null} | ForEach {Update-StoreMailboxState-Database $.Database-Identity $.MailboxGuid-Confirm:$false}

}

3. Use the "Connect-Mailboxt" command to restore the user mailbox

Connect-Mailbox-Identity ea02.srv-Database db21-User ea02.srv

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report