Powershell Script (.ps1 file) Does Not Work When Executed Through Task Scheduler

  • Thread starter Thread starter BhavanBaijnath
  • Start date Start date
B

BhavanBaijnath

Guest
Hi there, I have created a .ps1 file which contains a RoboCopy script to copy files from a folder on my C: drive which contains a database, and paste them into a folder on my OneDrive so that they can be safely backed up to the cloud and have a history of changes.The code runs perfectly fine when executed manually (By right-clicking the file in File Explorer and selecting 'Run with Powershell'), the problem is that the backup needs to happen on a regular basis, hourly is ideal, so I created a task inside of Task Scheduler to repeat the task every hour. The task itself runs fine (I tested this

Continue reading...
 
Back
Top