Score:0

How to catch item that triggers a trigger in Task Scheduler?

id flag

I want to write a powershell script that get executed whenever a new item/eventlog entry in the eventlog 'Microsoft-Windows-TerminalServices-Gateway/Operational' gets written.

It is easy to create a scheduler task that triggers whenever a new eventlog item gets created and that then execute a powershell script.

Now my question is, inside that powershell script, how can I access the eventlog-item that has triggered the trigger?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.