ajdratch
asked on
Exchange 2010 remove disconnected mailbox error - doesn't exist on database "mailbox"
I moved a client from Exchange 2010 to Office 365. Now that the migration is done, I want to remove Exchange. All the mailboxes are disconnected however I can't remove them. I ran the commands:
$mailboxes = Get-ExchangeServer | Where-Object {$_.IsMailboxServer –eq $true} | ForEach-Object { Get-MailboxStatistics –Server $_.Name | Where-Object {$_.DisconnectDate –notlike ‘’}} | select displayname, mailboxguid, database
$mailboxes | ForEach { Remove-Mailbox -Database $_.Database -StoreMailboxIdentity $_.MailboxGuid -confirm:$false }
I then get this message for every disconnected mailbox
Mailbox "31ea850d-6a5d-4286-9441-d 5baf6c7c4e f" doesn't exist on database "Mailbox".
+ CategoryInfo : NotSpecified: (0:Int32) [Remove-Mailbox], ManagementObjectNotFoundEx ception
+ FullyQualifiedErrorId : DFBA03DE,Microsoft.Exchang e.Manageme nt.Recipie ntTasks.Re moveMailbo x
I stopped the sync this morning by running Set-MsolDirSyncEnabled -EnableDirSync $false.
How can I remove these disconnected mailboxes
$mailboxes = Get-ExchangeServer | Where-Object {$_.IsMailboxServer –eq $true} | ForEach-Object { Get-MailboxStatistics –Server $_.Name | Where-Object {$_.DisconnectDate –notlike ‘’}} | select displayname, mailboxguid, database
$mailboxes | ForEach { Remove-Mailbox -Database $_.Database -StoreMailboxIdentity $_.MailboxGuid -confirm:$false }
I then get this message for every disconnected mailbox
Mailbox "31ea850d-6a5d-4286-9441-d
+ CategoryInfo : NotSpecified: (0:Int32) [Remove-Mailbox], ManagementObjectNotFoundEx
+ FullyQualifiedErrorId : DFBA03DE,Microsoft.Exchang
I stopped the sync this morning by running Set-MsolDirSyncEnabled -EnableDirSync $false.
How can I remove these disconnected mailboxes
ASKER
These are all the mailboxes that that were migrated to Office 365 so they did exist in Exchange 2010
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Or (maybe more likely) is this an old AD object that existed in a mailbox database prior to Exchange 2010? The AD object may still exist, but the mailbox database it refers to no longer exists. As it is, it's only passing back the GUID for the object. It's entirely possible these items that won't remove themselves can't because they never existed in Exchange 2010.