Forum Discussion
Orphaned Public Folder mailboxes on Exchange 2016
Hi ullerdk,
to remove orphaned Public Folder mailboxes in Exchange 2016, you can use the following steps:
- Identify the orphaned Public Folder mailboxes. You can do this by running the following PowerShell cmdlet:
Get-MailboxStatistics -Database <DatabaseName> | where {$_.DisplayName -like "Mailbox*"} | FT DisplayName,MailboxType,MailboxGuid,OwnerADGuid,Database,DisconnectDate,DisconnectReason,ItemCount,TotalItemSize,Identity,NeedtoMove,IsMoveDestinati
on,IsAbandonedMoveDestination,IsDatabaseCopyActive
This cmdlet will return a list of all mailboxes in the specified database, including their name, type, GUID, owner AD GUID, database, disconnect date, disconnect reason, item count, total item size, identity, need to move, is move destination, is abandoned move destination, and is database copy active.
Identify the mailboxes that have a MailboxType of PublicFolderSecondary and a DisconnectDate that is empty or equal to the current date. These are the orphaned Public Folder mailboxes.
- Remove the orphaned Public Folder mailboxes. You can do this by running the following PowerShell cmdlet for each orphaned mailbox:
Remove-Mailbox -Identity <MailboxIdentity> -Force
The -Force parameter is required because the orphaned mailboxes are not in a valid state.
- Verify that the orphaned Public Folder mailboxes have been removed. You can do this by running the following PowerShell cmdlet:
Get-Mailbox -Database <DatabaseName> | where {$_.DisplayName -like "Mailbox*"}
This cmdlet will return a list of all mailboxes in the specified database. If the orphaned mailboxes have been removed, they will not be included in the list.
Note: If you are unable to remove an orphaned Public Folder mailbox using the Remove-Mailbox cmdlet, you can try removing it using the Exchange Management Shell. To do this, open the Exchange Management Shell and navigate to the mailbox that you want to remove. Then, run the following command:
Remove-Mailbox -Identity <MailboxIdentity> -Force
If you are still unable to remove the orphaned Public Folder mailbox, you can contact Microsoft support for assistance.
You can find this link useful as a reference:
Remove orphaned Public Folder mailboxes: https://learn.microsoft.com/en-us/exchange/troubleshoot/public-folders/public-folder-migration-errors
Please click Mark as Best Response & Like if my post helped you to solve your issue.
This will help others to find the correct solution easily. It also closes the item.
If the post was useful in other ways, please consider giving it Like.
Kindest regards,
Leon Pavesic
(LinkedIn)
Thanks for replying.
However, it is not possible to do
Remove-Mailbox -Identity <MailboxIdentity> -Forcebecause the the mailbox cannot be found by the Get-Mailbox command.
I am using the ExchangeGUID from the orphaned mailbox for the identity parameter.
- LeonPavesicOct 12, 2023Silver Contributor
Hi ullerdk,
thanks for your update.you can still use (or eve try to use) the ExchangeGUID to remove orphaned Public Folder mailboxes with PowerShell, even if they cannot be found by the Get-Mailbox command. To do this, you can use the following PowerShell cmdlet:
Remove-Mailbox -Identity <ExchangeGUID> -ForceThe -Force parameter is required because the orphaned mailboxes are not in a valid state.
You can find the ExchangeGUID by running the following PowerShell cmdlet:
Get-MailboxStatistics -Database <DatabaseName> | where {$_.DisplayName -like "Mailbox*"} | FT DisplayName,MailboxGuidThis cmdlet will return a list of all mailboxes in the specified database, including their name and ExchangeGUID.
Once you have the ExchangeGUID of the orphaned mailbox, you can run the Remove-Mailbox cmdlet to remove the mailbox.
For example, to remove the mailbox with the ExchangeGUID of 12345678-90AB-CDEF-0123-456789ABCDEF, you would run the following PowerShell cmdlet:Remove-Mailbox -Identity 12345678-90AB-CDEF-0123-456789ABCDEF -Force
Please click Mark as Best Response & Like if my post helped you to solve your issue.
This will help others to find the correct solution easily. It also closes the item.If the post was useful in other ways, please consider giving it Like.
Kindest regards,
Leon Pavesic
(LinkedIn)- ullerdkOct 12, 2023Copper ContributorHi Leon.
Does not work:
Remove-mailbox -Identity 15a2517d-15dd-41a1-9953-c18389b658e6 -force
The operation couldn't be performed because object '15a2517d-15dd-41a1-9953-c18389b658e6' couldn't be found on