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
}