Notification only on deployment failure

3

This seems like a simple question, but I want to make sure I understand. I have a powershell script that I've written that will automatically sign in to AzureAD and run a command that disables a setting on any Office 365 mailbox that is found with the setting in question enabled. I would like to only get a notification email if the script fails for some reason and not every time it runs successfully.

I was thinking about the notification setting 'send only when results change'. In my head it seems like this would work as it will only run against one server and assuming it is successful each time it runs then it would only send the notification email when it runs and changes from success status to failed status. Is that accurate? Is there an easier way to do this?

Cancel
login to comment
2

Please disregard this question, but I will leave posted in case it helps someone else.

I have tested the setting 'send only when results change' on a schedule summary notification and it works just as I'd hoped. I set the schedule to run every 5 minutes and do not get notifications each time it runs successfully. I put a typo in to the ps file and when it failed I got a notification and then no more notifications while it continued to fail. Once I corrected the typo it was successful again and I got one notification alerting me to the success followed by no more notifications.

Cancel
login to comment

Reply