Hi
You can first find the hidden mailboxes and delete them then delete the database and try to uninstall Exchange On-premises 2019 again. Here are the detailed steps:
- Run “Get-MailboxDatabase” to see the MailboxDatabases you have.
- Use the following commands to check the mailboxes in the Databases separately:
Get-Mailbox -Database “Database Name”
Get-Mailbox -Database “Database Name” -Archive
Get-Mailbox -Database “Database Name” -Arbitration
Get-Mailbox -Database “Database Name” -PublicFolder
Get-Mailbox -Database “Database Name” -Monitoring
Get-Mailbox -Database “Database Name” -AuditLog - If you use the above commands to find any mailbox, you can use command of” Get-Mailbox -Arbitration/Archive/PublicFolder/Monitoring/AuditLog | Remove-Mailbox -Arbitration/Archive/PublicFolder/Monitoring/AuditLog -RemoveLastArbitrationMailboxAllowed “to remove the mailbox.
- Use EAC to navigate to Servers -> Databases, highlight the database you wish to remove and then click on the trash icon to delete the Database.
- Try to uninstall Exchange On-Premises 2019 again.
If this Answer is helpful, please click "Accept Answer" to upvote it. If you have extra questions about this answer, please click "Comment" and I will come to your aid.