I have a new script that goes out and deletes .Tar files that are over 7 days old. It runs perfectly when I run it from the command line with ./ but I cannot seem to get it to run as a scheduled task.
I opened my Task Scheduler and configured a Trigger to run every day at 8:30pm and an Action to "Start a program" the Program/Script is "powershell" and my Argument is
I go to manually RUN the script from the Task Scheduler and nothing happens, but if I run it from the PS command prompt, files delete as expected. Any advice? Does my argument have an error??