Check and Auto Refresh Exchange Server Mail Queue Using Exchange Shell

Ever since I started using Exchange Shell I wanted to write a script that check the Exchange server mail queue using Exchange shell and auto refresh theresult

So today I manged to get it done.

All you need to do is run it from your PC.

Save the script as .ps1 and change the server name to your Exchange server.

You can change the sleep time if you like.
$i =1
while ($i -le 2)  {Get-Queue -Server SERVER_NAME | ft;
sleep 4 ;
write-output “————“
;clear-host
write-output “Microsoft Exchange Server Email queue”
write-output “————“
Write-Host `n

}

CategoriesKB