Here's a good explanation.
https://michlstechblog.info/blog/windows-passing-parameters-to-event-triggered-schedule-tasks/
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have a Powershell script running on an event with the Task Scheduler and it works well, but I would like to get some of the information from the event to pass into the Powershell script. I cannot seem to find a list of available arguments I can pass in and find it hard to believe there are none?
For example I'd like to pass in the following:
event id
event message
event date/time
Anyone have any idea how to get these passed in as additional arguments?
Here's a good explanation.
https://michlstechblog.info/blog/windows-passing-parameters-to-event-triggered-schedule-tasks/
Hello there,
It seems like we cannot get the list of arguments in any official Microsft Blogs. To pass on additional arguments you can check the below articles which might help in getting some insights.
Windows Task Scheduler w/ Multiple Arguments https://learn.microsoft.com/en-us/answers/questions/564326/windows-task-scheduler-w-multiple-arguments.html
Scheduled Task - Trigerred by Event - Getting data into the scripts as parameters https://social.technet.microsoft.com/Forums/en-US/382b9023-01a9-4131-b2f2-8560b593bc3f/scheduled-task-trigerred-by-event-getting-data-into-the-scripts-as-parameters-question?forum=winserverpowershell
------------------------------------------------------------------------------------------------------------------------------------------------
--If the reply is helpful, please Upvote and Accept it as an answer–