Double hop access to copy files without CredSSP Double hop access to copy files without CredSSP powershell powershell

Double hop access to copy files without CredSSP


I found solution which works in our environment.

It is not possible to transfer credentials through double hop without Cred-SSP, but you can run something on target machine without first hop.

The simplest way is to use psexec with -s flag (run remote process in the System account), final string was something like this:

psexec \\someHost -s robocopy "\\stagingHost\Staging" "\\someHost\C$\Staging" /MIR

Also you can start some PS script in same way, just ensure that script execution is allowed on remote machine:

psexec \\someHost -s "\\stagingHost\Staging\Script.ps1" SomeArg1 SomeArg2

Check this article, to understand how psexec works.While service on someHost


CredSSP is the solution to the double-hop problem.

Remove the user's desktop from the equation. Set up a proper build & deployment server/service/application on your build server and manage everything from there. RedGate has a new product that will probably help you greatly with this, Deployment Manager


If the machine you're using can get to the other machines just copy the files using your machine:

$computers | % {copy '\\servershare\build' "\\$_\c`$\Temp"}$sb = {C:\Temp\Dosomething.txt args[0]}$computers | % {Invoke-command -comp $_ -scriptBlock $sb -argumentlist $arg}