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?