Answer the question
In order to leave comments, you need to log in
How to send standard Windows error messages in the log?
I'm trying to set up sending emails when errors with the severity of Crirical or Error appear in the log.
It is possible to do this through the Task Scheduler, but there the Action "Send an e-mail" is marked as "deprecated"
and when the scheduler task is saved, a message appears
How can this be done using Windows? Or do you have to write a script?
Any tips for solving the problem would be helpful!
Answer the question
In order to leave comments, you need to log in
In the task scheduler, select the program execution and, as an argument, pass it a Powershell script that will send mail , as suggested by @LiguidCool
In the scheduler, add Action:
add to the arguments:
-ExecutionPolicy RemoteSigned -Command "D:\ПУТЬ_ДО_СКРИПТА\СКРИПТ.ps1"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question