I want to install the TortoiseSVN-client on a bunch of servers, using Powershell remoting. Basic operations work, but the below command won't work as remoting
Invoke-Command -ComputerName myserver -ScriptBlock {Start-Process "msiexec.exe" -ArgumentList "/i \\fileserver\install\subversionclients\TortoiseSVN-1.14.0.28885-x64-svn-1.14.0.msi /passive /norestart /qn ADDLOCAL=ALL" -Wait}
On the other hand, logging on to the server and issuing the following
Start-Process "msiexec.exe" -ArgumentList "/i \\fileserver\install\subversionclients\TortoiseSVN-1.14.0.28885-x64-svn-1.14.0.msi /passive /norestart /qn ADDLOCAL=ALL" -Wait`
...that works. I have not been able to figure out why - no errors are shown, and no return value either. As I have understood Invoke-command it is elevated by default. Trying to add -Verb RunAs
does not help either. I do also have the -wait
-argument (ref. https://serverfault.com/a/550169/180067) but that did not help either in my case.
This is because you are using Kerberos authentication, and you try to perform a "double hop", and this is not possible by default with Kerberos (basically, you can authenticate to "myserver", but you can't "hop" again to "fileserver").
What you can do:
-Authentication CredSSP
and-Credential "yourUserName"
to the command, and follow the instructions shown in the error message.Additional details, considerations, and different solutions are available here: Making the second hop in PowerShell Remoting
and here to configure CredSSP: Enable PowerShell "Second-Hop" Functionality with CredSSP