Score:0

Exchange 2019 old migration issue

cn flag

So awhile ago I was doing some Exchange Online migration work. I setup a migration from ExO to Ex2019 for a mailbox, but it failed due to space issues. I since fixed the space issue by creating a new database on a new volume, did the migration again. Since then we migrated that mailbox back to ExO. The mailbox is fine.

I have been monitoring database usage on the old database, I may delete it, but wanted to ensure backups were still occurring and its free space cleared up.

Running this command shows a 'mailbox' still taking up some space, and after months of waiting, it hasn't disappeared on its own.

Get-MailboxStatistics -Database DB-MBX-7 | fl Identity, MailboxGuid, DisplayName, ItemCount, TotalItemSize, IsMoveDestination, DisconnectReason

Identity          : 28787fdc-3b94-472f-8f67-476f26e1d4e4
MailboxGuid       : 28787fdc-3b94-472f-8f67-476f26e1d4e4
DisplayName       : mbx01
ItemCount         : 15173
TotalItemSize     : 1.462 GB (1,569,474,663 bytes)
IsMoveDestination : True
DisconnectReason  : 

Running Get-Mailbox on mbx01 shows it is not found, and Get-RemoteMailbox shows that it is found in ExO, meaning the identity and its mailbox are working fine. It is roughly 85GB in size. But this leftover mailbox is still occupying space locally, and I am unsure how to clear it out.

As suggested, I tried running the below, but gives me an error:

Remove-StoreMailbox -Database DB-MBX-7 -Identity "28787fdc-3b94-472f-8f67-476f26e1d4e4" -MailboxState Disabled

The mailbox 28787fdc-3b94-472f-8f67-476f26e1d4e4 isn't disconnected.
    + CategoryInfo          : InvalidArgument: (28787fdc-3b94-472f-8f67-476f26e1d4e4:StoreMailboxIdParameter) [Remove-StoreMailbox], RemoveNotDiscon...manentException
    + FullyQualifiedErrorId : [Server=EX2019,RequestId=769a2204-9488-40f8-9e41-26be2917b230,TimeStamp=19/06/2023 5:12:45 AM] [FailureCategory=Cmdlet-RemoveNotDisconnectedStoreMailboxPermanentException] BF8793
   E2,Microsoft.Exchange.Management.StoreTasks.RemoveStoreMailbox
    + PSComputerName        : ex2019.contoso.com.au

It is the same for SoftDeleted also.

How do I clear out this old destination mailbox?

Score:0
it flag

Please run the following command to determine whether the status of this mailbox is disabled or soft-deleted disconnected:

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

Then you can run the following command to permanently delete this mailbox from the database:

To clear a disabled mailbox:

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

To clear a soft-deleted mailbox:

Remove-StoreMailbox -Database MBD01 -Identity "Username" -MailboxState SoftDeleted

For more information, you can refer to this link: Permanently delete a mailbox | Microsoft Learn

TheManInOz avatar
cn flag
Thanks. The first command shows a DisconnectReason of Blank. I was considering trying to use Remove-StoreMailbox using the GUID of the old mailbox, however on checking the current mailbox in ExO has the same GUID, so am worried it will affect this also?
HuiA avatar
it flag
Are you currently running HCW? If you are concerned about affecting Exchange online, you can temporarily disconnect it and confirm that the mailbox deletion is complete before running it.
TheManInOz avatar
cn flag
I can't run it anyway. Because MailboxState is blank, it reports "The mailbox 28787fdc-3b94-472f-8f67-476f26e1d4e4 isn't disconnected."
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.