Robocopy to copy files to a remote machine

Neil picture Neil · Oct 7, 2013 · Viewed 11.6k times · Source

I'm trying to write a robocopy command to copy files from my local computer to any one of my deployment servers

ROBOCOPY ../../MyService/bin/release/ \\remote-computer\\C:\services\myservice /MIR

and I get this error

The system detected a possible attempt to compromise security. 
Please ensure that you can contact the server that authenticated you.

This is expected as I haven't included any sort of security credentials in the command.

Is there a way to get this to work by including permissions? I don't want to have to do this by sharing folders and stuff like that. I've looked but I can't see anything in the documentation.

Should I do this with something like psexec? Or perhaps I should be using something like powershell instead?

Answer

Srihari Sridharan picture Srihari Sridharan · Mar 5, 2015

Can you please take a look at this answer to see if this answers your question: Robocopy commands to copy a file to over 50 remote machines. Also, please take a look at this KB article: http://support.microsoft.com/kb/938457.