On a Windows Server 2016 machine, I want to configure Task Scheduler to run an action based on an event. But I cannot get it to work.
Here is how I can easily reproduce it:
- If not done yet, click on Enable All Tasks History at the Actions pane on the right
- Click on Create Task...
- Enter "Trigger Test" in the Name field
- Go to the Triggers tab, click New
- For Begin the task:, select On an event; as Log select System; click OK
- Go to the Actions tab, click New
- In Program/script, enter "C:\Windows\notepad.exe"; click OK
- Click OK to finally create the task
Now go to the History tab of the "Trigger Test" task. Besides the Information, that the "Trigger Test" task is registered, there is a warning with Event ID 113, saying:
Task registered task "\Trigger Test" , but not all specified triggers will start the task. User Action: Ensure all the task triggers are valid as configured. Additional Data: Error Value: 2147946601.
The history entries may only be available a few seconds after the task is created, press F5 to refresh in that case.
So I cannot get my task to work. Of course, I want to register for specific events and instead of "notepad.exe", I want to run a PowerShell script to send an e-mail. But the same problem occurs there, and above is the easiest way I could break it down to not working.
All other values of the task remain default values, so the task will run under the current user and only if he is logged on.
I don't know if it matters, but it is a Windows Server 2016 Datacenter edition (version 1607) running on Amazon AWS in an EC2 instance.
Any help would be appreciated, as I already spent hours and hours of research and trial & error, but without any success. Googling the above error message - especially together with that exact error code - doesn't reveal anything useful.
admin
? The thing is in my machine it states the app as owned by the admin