Instead of using Write-Host to display the warnings, you might consider using the Write-Warning cmdlet. I would also encourage you to consider writing an object to the pipeline so that you can do more. Right now, all you can do is read the results on the screen. There is no way to save the results to a file, send as a mail message, export to a CSV or anything. You might create a custom object with the computername, the count of messages in the queue, the current datetime and even your status message.