1

I need to install some application on a list of machines. on one of machines, i use below command to install it, it works well and finish installation in a few mins.

Start-Process -FilePath "c:\javabits.exe" -ArgumentList '/s' -Wait

However when I use Invoke-Command to push it to a list of machines, it finishes immediately without error message, and the application wasn't installed. May I know why this happens?

Invoke-Command -ComputerName $serverlist -ScriptBlock {
    Start-Process -FilePath "c:\javabits.exe" -ArgumentList '/s' -Wait
}
Ansgar Wiechers
  • 193,178
  • 25
  • 254
  • 328
Arthas Liu
  • 31
  • 4
  • Do you start the `invoke-command` with the adequate credentials on the remote computer? – Manu Nov 10 '17 at 08:42
  • yes. using my credential which is administrator on these machines. – Arthas Liu Nov 10 '17 at 08:43
  • Is it working if you specify one hostname instead of a list? – Manu Nov 10 '17 at 08:43
  • there should be some setting on these machines which caused this issue, since i can push this command to other machine list. specify one is also not work. do you know which setting will impact this? – Arthas Liu Nov 10 '17 at 08:49
  • what happens when you create a file instead of starting an application? e.g. `Invoke-Command -ComputerName $serverlist -ScriptBlock {"test" | Out-File c:\test.txt"}` is it created? – Guenther Schmitz Nov 10 '17 at 09:27

0 Answers0