How to send by standard means of Windows messages about errors in the log?

Trying to set up sending letters when you are prompted in the error log with a severity or Crirical Error.
There is a possibility to do it using task Scheduler, but there is Action "Send an e-mail" is marked as "deprecated"
a8a4b668c4364eb8b82ba9cbed8f7596.png
and when you store the task scheduler error message
1a512f7128b84bf388bd832ce1ae3428.png
How can this be done with Windows? or have to write a script?
Any advice to solve the problem will be useful!
July 12th 19 at 17:10
3 answers
July 12th 19 at 17:12
Solution
In task scheduler to choose the execution of the program and the argument to pass it a Powershell script that will send mail, as suggested by @LiguidCool
The planner adds the Action:
31ddeb4abb0f4f54b6c45c417dac0c39.png
in arguments add:
-ExecutionPolicy RemoteSigned -Command "D:\ПУТЬ_ДО_СКРИПТА\СКРИПТ.ps1"
July 12th 19 at 17:14
PowerShell?
July 12th 19 at 17:16
in "computer management" has a section "performance" - it is possible to do what you want

Find more questions by tags System administrationWindows Server