I did an Enter-PSSession, then ran the command using start-process. It hangs indefinitely. I did have to change the command a little, because I couldn't just put the whole command in quotes - that gave me an error saying the file wasn't found. I separated
it into -filepath and -argumentlist params. Below is what I ran:
Enter-PsSession -computername computer01
start-process -filepath "C:\windows\Temp\proplussp2013-kb2817430-fullfile-x86-en-us.exe" -argumentlist "/quiet"
This resulted in the session hanging indefinitely. So here is where I'm at:
- Enter-PsSession then running the command works
- Invoke-command with the command immediately finishes, with no output and the program doesn't actually install
- Enter-PsSession then running start-process hangs indefinitely
- Invoke-Command plus start-process hangs indefinitely
I was curious to see if this held true with other programs, so I tried installing a program from HP with a silent switch and got identical behavior throughout all four scenarios listed above.
Turning off on-access A/V protection made no difference.
Finally, regarding mjolinor's question about the program running in non-interactive environments: to the best of my knowledge the program can - but I'm not positive. I would assume, however, that invoke-command would build the same sort of environment as
Enter-PsSession does, and it works there.