Hi @fsdg
If you would like to remove the public folders and public folder database, you can use the following commands in EMS on Exchange 2010 server:
Get-PublicFolder -Server <Exchange 2010> -Recurse -ResultSize Unlimited | Remove-PublicFolder -Server <Exchange 2010> -Recurse -ErrorAction:SilentlyContinue
Remove-PublicFolderDatabase <Public Folder Database name> -RemoveLastAllowed
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 to enable e-mail notifications if you want to receive the related email notification for this thread.