RoboCopy Task Scheduler Problem - Powershell Script Fails When "Run whether user is logged on or not" Checked

S

Stephen McLaughlin

The script runs perfectly from the command line and even in Task Scheduler when "Run only when user is logged on." However, it fails when "Run whether user is logged on or not" is selected. I enabled password storing on the system and under security options the correct user is specified SERVER\Administrator, but it still fails with an error code 3.


PowerShell Script:robocopy E:\Docs\Steve_Test Z:\Steve_Test /MIR /FFT /Z /XA:H /W:1 /TBD /TEE | Out-file C:\temp\Backuplog -Append

Error:

2019/06/28 12:06:05 ERROR 3 (0x00000003) Creaqting Destination Directory Z:\Steve_Test\

The system cannot find the path specified.


Again this runs perfectly, even in task scheduler except when "Run when user is logged in or not." By the way, I should add that E:\ is local and Z:\ is a remote share.




Thank you for your time.

Steve McLaughlin

Continue reading...
 
Back
Top Bottom