Forum Discussion
Ksquared_AU
Jun 07, 2019Copper Contributor
Powershell v's Task Scheduler
Weird one.
I have a power shell script that emails a PDF . Script works fine when running in isolation (email and attachment are received).
How ever when the script is run from task scheduler, only the email is received. The attachment is not attached.
I have tried the execution policy, but in thinking its a file permission thing from scheduler.(running as domain admin)
Any ideas, hive mind?
Cheers
- donnuwanCopper ContributorHi,
Do you have "Run whether user is logged in or not " checked in?
And also make sure "do not store password is unchecked"
Check the "run with highest privileges as well.
Regards,
D - Kevin_MorganIron Contributor
Also ensure the domain admin user has enough permission to write file in local path which you have used in your PS script.
- DarrickBrass Contributor
Why are you running a scheduled task with domain admin privileges?
That is not a good practice.