I have a powershell script that generates a report and exports it out as an excel file and then emails it as an attachment.
This works perfectly when I run the powershell script, I then created a batch script that calls this powershell script and when I run the batch command it also works.
I then created a task in task scheduler and set it to run the batch command, when I execute it on command it works. However when I set it to run at designated times, it will generate the report and send the email but will not attach the spreadsheet in the email.