In Exchange, you have the option to view your mail queues using the GUI interface and you can at a quick glance view the error of a specific domain or if something is wrong.

With Powershell, you can do the same thing. To firstly get a list of all the queues you run the following command:

  • Get-Queue

or if you have more than 1 Exchange 2019 server that is handling the transport then you can use this command to view that specific server:

  • Get-queue -Server Exchange-2019
Exchange 2019 - create a new mailbox with powershell

As we can see above, we have a problem with Exchange-2019\3.

To drill down into this queue and why its giving an error, we can use the following command:

  • Get-Queue -Identity Exchange-2019\3 | fl
Exchange 2019 - create a new mailbox with powershell

We can now see the same error as per the GUI and thus can troubleshoot further, in this case it is a DNS error as it cannot locate the FQDN of outlook.com

Hope it helps.

Discover more from Everything-PowerShell

Subscribe now to keep reading and get access to the full archive.

Continue reading