If your goal is to send an email when a certain event is logged in Windows, you could do that a little differently. Read these:
Event Log Email Alerts with PowerShell – Brian Lachniet
Once you get it setup and working, you could possibly automate the resolution into the scheduled task as well, instead of just the email.