I have a Powershell script I want to schedule. With this script, I want to send out an email.
When scheduling it only when I'm logged on, everything runs fine. The email gets sent out, no issues whatsoever.
However, as soon as I select the option to run it whether I'm logged on or not, it returns the error code 0xfffd0000 with the result code being 4294770688.
I use the program powershell.exe and as arguments -File "L:[path]\test.ps1". The path is correct, and just using powershell.exe has worked when not selecting the "Run whether logged on or not".
I tried changing the path to "C:[path]\test.ps1" (And copying the powershell script there ofc), and that worked.
I have the "Log on as batch job" rights. I tried using a script that simply creates a txt file. There are no spaces in my path. I don't get any warnings at any step of the way. I tried using the admin user. I tried running the scheduler as admin. I tried checking the "Run with highest priviledges" option. I've tried changing the configured server from "Windows Vista, Windows Server 2008" to "Windows 7, Windows Server 2008 R" and to "Windows Server 2019".
It really seems to me that the issue lies with the fact that the script is located on a remote server. That is however not something I want to change. The script should be located on the remote server.