Hi @Semjon Paul,
Welcome to Q&A!
To help us better understand your problem, please kindly share some screenshots:
Screenshots of the error message encountered when executing the Export-ModernPublicFolderStatistics.ps1 script
- Screenshots of the MFCMAPI interface when attempting to delete the problematic folder
I’ve replicated this scenario in my test environment (Exchange server 2019) with the following results.
a. Created two test folders: PFSUB01 (valid naming format) and PFSUB\02 (invalid format with backslash).
Both folders appeared in the dumpster_root immediately after deletion. Manual deletion attempts were unsuccessful.
b. Successfully executed the export script.
c. The generated CSV only included the valid folder (PFSUB01), with no data for the invalid folder (PFSUB\02). It indicates the export script automatically filters out folders with invalid naming conventions.
Since Exchange Server 2013 is now out of support, we'd like to understand whether you plan to maintain a hybrid environment or transition to a pure cloud solution.
If you choose to keep the hybrid environment, we recommend first upgrading your Exchange Server to the 2019 version before migrating public folders to Exchange Online.
Alternatively, if you prefer a more immediate solution, you can migrate public folders directly using Outlook PST export. Detailed steps for this approach are available in Microsoft's official documentation: Batch migrate Exchange Server public folders to Microsoft 365 or Office 365 | Microsoft Learn.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation](https://aka.ms/msftqanotifications)) to enable e-mail notifications if you want to receive the related email notification for this thread.