Hello i would like to send an email or at least write a log entry with a "Runbook Job Output" (not an Error)" where i could at least create a alert. Is this possible?
Hello i would like to send an email or at least write a log entry with a "Runbook Job Output" (not an Error)" where i could at least create a alert. Is this possible?
Its a little embarrassing but i forgot to publish it, so now the warning works. with write-error i struggle still but warning is enough.
now i will have a look at the Log Analytics workspace and then create alert to notify you via email Option asap.
Hi @Alex-5595,
Did you get chance to review my earlier response? Let me know if you have any further queries regarding it.
Hello tbgangav at the moment i struggle with the write-error or write-warning in the powershell script i want to run. Works fine in the test run window, at least the warning messages. But on a scheduled Job i just habe the outputstream filled not the warning (error is anyway already in script with errors)?!
Hi @Alex-5595,
If possible, can you share your runbook so I can try to reproduce the same issue and try to diagnose the issue in a better way?
In general, as shown in below screenshot, I was able to see warning / error in their respective streams.



For more information w.r.t it, please refer this document. Adding a screenshot of the same for reference.

Hi @Alex-5595,
You can forward runbook job data to a Log Analytics workspace and then create alert to notify you via email. For more information w.r.t it, please refer this Azure document.
Hello tbgangav it worked in help with the document very well. Thank you alot.
4 people are following this question.