PowerShell write-host command keeps repeating when I set it as Event Viewer log notification

Viewed 20

I wanted to get notified when a specific event in Windows Event Viewer happens, so I did this:

enter image description here

used C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe as program for the action and then typed this in the arguments:

write-host "something"

when the task is triggered, the Powershell window repeatedly closes and opens.

how can I make it only show the message once and stay open?

0 Answers
Related