Hi I'm trying to form a psexec (or perhaps robocopy?) command which will allow me to use given account credentials to copy a directory over to a remote machine. I'd prefer to use robocopy, but the remote machine is an XP machine.
I've tried something like these commands which don't do what I want them to
psexec \\compB -u blah -p blahblah -i -c -f robocopy.exe path1 networkpath2 /E
So how can I flip this around so that it will use those credentials and run robocopy remotely, transferring files from computer A to computer B?
I can successfully transfer files using a straight up robocopy command using machine names but it needs to work when we're not on the same domain. Psexec from what I understand allows me to impersonate as a user (so use the credentials) and run programs remotely, but since xp doesn't have robocopy built in and I need to reference files on my local machine as well as transfer to the remote machine, I don't know how the whole thing is going to work.
robocopy compAPath \\compBNetPath /E
that's the robocopy command which successfully copies files, but won't this only work when we're on the same domain? and won't it not use credentials? If i change the machine name to \\machineipaddress will it work when not on the same domain?
to give a sense of context, I'm forming these commands then firing them off to a command line to run a bunch of them on the remote machine, so if I can use some magical c# wizardry to make the commands run using credentials so they don't need to be included in the commands themselves, let me know.