https://everything-powershell.com/exchange-2019-check-a-mail-queue-that-is-giving-an-error-with-powershell/
Exchange 2019 - Check a mail-queue that is giving an error with PowerShell