Nobody knows what's in the script you're running. If it doesn't set (or specify) the correct location in which to store your data, then you need to fix that in your script -- or maybe add the directory in the "Start in" box.
task scheduler creating backup, but saving to wrong location
I have a task set up to create a scheduled daily backup. I am trying to have the zip file sent to this specific location: C:\FCCS\Backup\FCCSBackup.ps1
However the zip files are saving to this location: C:\Windows\System32
Attached are two screenshots; the first one is of the details of the Action in Task Scheduler. The second screenshot is of the location the files are being sent to.
Any idea why this is happening and how I can fix it?
2 answers
Sort by: Most helpful
-
-
Limitless Technology 43,931 Reputation points
2022-05-26T07:36:30.66+00:00 Hello
Thank you for your question and reaching out. I can understand you are having issues related to scheduled daily backup path location.
Please check from script if its using Generic path variable like $Path then it should take default path C:\Windows\Sytem32
You can also use Script Tracing and Logging which should save debug logs of PowerShell execution.
Start-Transcript -path "C:\BackupLog.txt"
Stop-Transcript
----------------------------------------------------------------------------------------------------------------------------------------------------------
--If the reply is helpful, please Upvote and Accept as answer--