Orphaned Public Folder mailboxes on Exchange 2016

Copper Contributor

I could really use some help on this strange case.

We have 9 Public Folder Mailboxes, but have now discovers some strange orphaned Public Folder Mailboxes, which might be a leftover from a failed PF migration Exchange 2010->2016 long time ago.

How do we get rid of those orphaned PF mailboxes?

They are not in disconnected nor softdeleted state, so Remove-StoreMailbox does not work on them.

The orphaned PF mailboxes cannot be found via Get-Mailbox, neither by adding -PublicFolder parameter.

 

 

 

$dbs | foreach {Get-MailboxStatistics -Database $_.DistinguishedName} | where {$_.DisplayName -like "Mailbox*"} | FT DisplayName,MailboxType,MailboxGuid,OwnerADGuid,Database,DisconnectDate,DisconnectReason,ItemCount,TotalItemSize,Identity,NeedtoMove,IsMoveDestinati
on,IsAbandonedMoveDestination,IsDatabaseCopyActive

 

 

DisplayName MailboxType MailboxGuid OwnerADGuid Database DisconnectDate DisconnectReason
----------- ----------- ----------- ----------- -------- -------------- ------------
Mailbox2 PublicFolderSecondary 57692c3a-d57f-4652-917b-8223f8ad2b7c 809454ab-b463-4e5a-9e09-8ac1b2e5ff85 MDB01
Mailbox3 PublicFolderSecondary 6b0565c3-0846-42fb-9448-bf4fe238876d d16f3133-c254-4069-92f4-ba9a69647499 MDB01
Mailbox6 PublicFolderSecondary ba3a39a7-36cf-4784-bf4f-ddfcb5df297c f8ce03b6-5bd6-408e-a5eb-fa54161f5628 MDB01
Mailbox1 PublicFolderPrimary 133bb627-c313-49ea-98fa-13bd36293101 0c94e8eb-448b-4961-9643-aa8676381426 MDB01
Mailbox3 PublicFolderSecondary 90999c77-c223-4522-ab56-3b016953463c 2234611b-9905-4260-ae77-4915aeb42564 MDB01
Mailbox5 PublicFolderSecondary eb508a0c-110e-4eec-bd85-4bc709c0e8c9 980d33a1-c998-410c-8884-f060f2fd410e MDB01
Mailbox2 PublicFolderSecondary b24e264a-d6e4-447d-af05-890b2ab2cc8c 30cfa863-cd0a-44f3-8b60-fee6ddbaa0e0 MDB01
Mailbox4 PublicFolderSecondary d671ef2c-6fcd-4990-8bbe-130f3415e698 2c44801a-e314-4c6f-8d13-9d5e1c2b0cd9 MDB01
Mailbox1 PublicFolderPrimary 11be9410-032a-4ccb-b6bf-6bb2069bac38 cd979f57-bbca-429d-b97a-eb5d3617b9fd MDB01
Mailbox6 PublicFolderSecondary 9cb72c8a-72cc-445b-b80f-0d0fc254bc95 82b5bcef-604c-4b8c-9e84-b024601b53df MDB01 3/26/2021 2... SoftDeleted
Mailbox8 PublicFolderSecondary 56b50774-0d23-4b20-8af1-d61b3900a4d4 6563e3f2-46e9-4aa7-934c-14cd75d2d0b4 MDB01
Mailbox4 PublicFolderSecondary 98eda07c-8049-4cad-ae81-b65bc0b27c23 0ba7ea9e-244a-42ee-b2b1-0c2614436c49 MDB02
Mailbox1 PublicFolderSecondary 31e9e360-009b-463b-b8a2-f761a56f997a 9a45e47d-aea2-4bcb-b985-618d007ea865 MDB02
Mailbox5 PublicFolderSecondary d1bba6a8-7ff6-4577-b84a-451d6d55afee e50e7025-b9b5-4b9c-8412-2917d44fff33 MDB02
Mailbox6 PublicFolderSecondary a7b7b545-3a1c-4ef6-a8e3-6c6d2cb8c0f9 fec19785-c7cb-45ab-9719-cdcef9f0afce MDB02
Mailbox2 PublicFolderSecondary 628e2717-f9d8-4474-8df5-dadeda913537 e1708ff0-74a8-44b5-97d6-0f78846c9476 MDB02
Mailbox3 PublicFolderSecondary 5e61b25b-046f-4448-9c9b-06407cc184fb 46ba3496-2b21-4f24-9df4-b46236b78a5a MDB02
Mailbox5 PublicFolderSecondary 457da40b-4f97-4185-895c-fff9a0c03c3c 19e6e5c7-8f95-46b4-8222-6b663a4c949a MDB02
Mailbox6 PublicFolderSecondary 9cb72c8a-72cc-445b-b80f-0d0fc254bc95 82b5bcef-604c-4b8c-9e84-b024601b53df MDB02
Mailbox1 PublicFolderPrimary 185ad25c-f44d-4bc2-852f-1bb8db4c08d8 9a9c314e-ded7-4564-aa96-2c1ce7ce2ad1 MDB03
Mailbox5 PublicFolderSecondary f390b4a0-a243-468b-ba72-bf38ae4d29e0 6f157c31-bd56-48cc-9604-4bc9fe79c74a MDB03
Mailbox2 PublicFolderSecondary a42a24ec-243e-4bf7-a102-9ea29872fba2 903c23a1-2503-4f4a-ba13-8c8b4a442da2 MDB03
Mailbox4 PublicFolderSecondary b486a05a-ffd8-4af1-a8cf-3859d91329cb 21ab2bb1-2858-41c6-a0e1-f63e13775cd3 MDB03
Mailbox6 PublicFolderSecondary a7c585be-7a3b-4fe8-a728-dbb5777e1456 2b2d53d8-1d6d-4f7b-b3bc-a6ec382d09e0 MDB03
Mailbox7 PublicFolderSecondary 0bacab36-0550-4c66-b539-83c480557a92 e205809a-46cf-4486-a393-1e03c5e32ee2 MDB03
Mailbox3 PublicFolderSecondary f01737e6-7d42-4466-a5f2-7a80c9e0464b 1ada0798-473d-4e28-9118-d97bf183f75e MDB03
Mailbox7 PublicFolderSecondary 15a2517d-15dd-41a1-9953-c18389b658e6 2a8b99b5-6fc3-4cd2-ada1-1b3c6b279961 MDB03
Mailbox7 PublicFolderSecondary bf16d8e0-1b02-4067-a830-83a1f43c83e2 de00ad97-62ce-4809-aeec-c94f54b50182 MDB03
Mailbox4 PublicFolderSecondary 1535f307-07ec-4540-876a-88f7fa7dafcc 97ef1771-8948-40ce-86b4-fed6c1a53207 MDB03
Mailbox9 PublicFolderSecondary a4ba285a-3905-43f9-bb70-87e26de89d03 f9a4c89e-354f-4ede-b62b-f7bc45627f4d MDB03

 

This is both the real PF mailboxes and the orphaned PF mailboxes.

AD user objects for the orphaned PF mailboxes cannot be found in AD via Get-ADUser {OwnerADGUID}

 

Any suggestions on how to remove the orphaned PF mailboxes?

4 Replies

Hi @ullerdk,

to remove orphaned Public Folder mailboxes in Exchange 2016, you can use the following steps:

  1. 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.

  1. 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.

  1. 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-error...

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)

@LeonPavesic 

Thanks for replying.

However, it is not possible to do

Remove-Mailbox -Identity <MailboxIdentity> -Force

because the the mailbox cannot be found by the Get-Mailbox command.

I am using the ExchangeGUID from the orphaned mailbox for the identity parameter.

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> -Force

 

The -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,MailboxGuid

 

This 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)

Hi 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