I have a backup script (Powershell 1.0) that is executed every night by the Task Scheduler on my Windows 2008 box. If that script should fail to start, e.g. because the script has been moved or something similar, or if the script fails during execution, I would like to get a email notification.

There are many examples of getting Task Schedular to send an email based on an event log entry. However, I only want to be notified if MY particular scheduled task fails, not get a notification for all tasks that fails with an EventID 203/103/201. How can I do that without any custom software?


You have to edit it in xml.

So for example

  <Query Id="0" Path="Microsoft-Windows-TaskScheduler/Operational">
    <Select Path="Microsoft-Windows-TaskScheduler/Operational">*[System[(EventID=103 or EventID=201 or EventID=203)]]</ and *[EventData[Data and (Data='PUT TASK NAME HERE')]]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.