Windows 10 Pro 1809
This is my first try at writing a script to run at shutdown using Task Scheduler.
Basically, I am sending an email from the computer at shutdown to a smart plug to turn off. The task scheduler runs, but the email is not sent. I need some help to find out what I need to change in the script so that it will send the email.
(I have edited the script for privacy reasons, but everything else is the same. And, I am using AOL for the sending from email address, I would like to keep it AOL)
Here is the script:
Send-MailMessage -To xxxxx@whatever.com -Subject “#Off” -Body “none” -SmtpServer smtp.aol.com -From xxxxx@aol.com
And this is the trigger in the task scheduler:
Log: System
Source: User32
Event ID: 1074
Thanks and appreciate any help with this.