When you delete a mailbox or an Active Directory account, the soft-deleted or disconnected mailbox won’t immediately appear in the list of disconnected mailboxes. The mailbox status is updated as part of a mailbox store maintenance task.
When you query a mailbox database for disconnected mailboxes, you will find a mailbox having the DisconnectReason and DisconnectDate attributes empty.
# Query the mailbox using the original user display name
Get-MailboxDatabase | Get-MailboxStatistics | Where { $_.DisplayName -eq "LASTNAME, FIRSTNAME" } | fl DisconnectReason,DisconnectDate,MailboxGuid,Database
# Use wildcards if the correct display name is unknown
Get-MailboxDatabase | Get-MailboxStatistics | Where { $_.DisplayName -like "*LASTNAME*" } | fl DisconnectReason,DisconnectDate,MailboxGuid,Database
DisconnectReason :
DisconnectDate :
MailboxGuid : a04a8aab-c360-406b-a194-8c290d56668b
Database : MBXDB34
You can find disconnected mailboxes by
- DisplayName
- MailboxGuid
- LegacyExchangeDN
The following PowerShell cmdlet updates the mailbox state of a single mailbox using the MailboxGuid as an identifier.
Update-StoreMailboxState -Database MBXDB34 -Identity a04a8aab-c360-406b-a194-8c290d56668b
After updating the mailbox state, the DisconnectReason and DisconnectDate attributes are correctly set.
Get-MailboxDatabase | Get-MailboxStatistics | Where { $_.DisplayName -eq "LASTNAME, FIRSTNAME" } | fl DisconnectReason,DisconnectDate,MailboxGuid,Database
DisconnectReason :
DisabledDisconnectDate : 01.01.2017 15:02:59
MailboxGuid : a04a8aab-c360-406b-a194-8c290d56668b
Database : MBXDB34
The disconnected mailbox is now visible in Exchange Administrative Center (EAC) and can be reconnected using EAC or Exchange Management Shell.
By default, a disconnected mailbox is supposed to be connected to its original account having a matching LegacyExchangeDN attribute. Connecting the mailbox to a different Active Directory account requires using the AllowLegacyDNMismatch parameter.
# Connect a mailbox to the original AD account having a matching LegacyExchangeDN Connect-Mailbox -Database MBXDB34 -Identity "Doe, John" # Connect a mailbox to a different AD account Connect-Mailbox -Database MBXDB34 -Identity "Doe, John" -User "Jane Doe" -AllowLegacyDNMismatch
Examples of room and shared mailboxes are described in the Connect-Mailbox documentation.
