I have a .bat that copies files from source to destination. The source is the local joined server, the destination is a non-joined computer on the network. I need to run this .bat with task scheduler. What user can have privileges on the destination folder? On task scheduler I can only set local or domain users.
The syntax of the bat is like the following:
robocopy "C:\temp\test.txt" "\\192.168.0.1\c$\temp"
Best Answer
Since this question has a lot of hits from search engines I though it will useful to add another method that works well (mentioned in this reply to a similar question):
You can add the credentials to a user profile in Windows using the Credential Manager found in the Windows control panel.
MyDomain\MyUser
)Your scheduled task will now automatically use the credentials saved in the Credential Manager for the specified host.
Note that if user password changes you would need to update that in the Credentials Manager.
And a picture that worth a thousand words: