I have the the following setup.
1 x host machine situated in DOMAIN A 1 x PDC in a VM running on a host only network adapter running its own AD Forest (DOMAIN B) 1 x Server running in DOMAIN B, this is also on a host only network adapter but has a secondary adapter which is running in NAT mode Via VirtualBox (the PDC is running in the same VirtualBox instance).
I need to take files in DOMAIN A and copy using ROBOCOPY to DOMAIN B where no trust relationship exists, DOMAIN B is totally isolated and is never allowed to talk to DOMAIN A in any fashion at all.
One way of doing this would be to use PSEXEC from sysinternals and copy the files using the networkpath to the files FROM DOMAIN B this approach has been ruled out entirely, for various reasons, one of which is time and the reworking of a process that would take too long (allthough it would be possible)
I can copy the files with runas with the
/netonly switch without issue manually from a cmd line giving run as the password at runtime, this all works.
The problem is I am running this copy from inside a rake command which invokes Robocopy using the MSBuild Extensions (just executes Robocopy.exe).
Is there a thirdparty of runas or equivalent tool that allows the
/netonly behaviour of runas with the password given as a switch ?
the equivalent syntax for runas (if runas supported this behaviour) would be the following:
runas /user:firstname.lastname@example.org /password:password /netonly "c:\system32\robocopy.exe C:\somedir \"\\TARGETSERVER\c$\somedir\" \"*.*\" /MIR /A-:R"