I need help with modifying some code that installs .EXE files on remote computers, to work with .MSI packages.
$process = 'java.exe' $argList='/s' $sb=[ScriptBlock]::Create("Start-Process `"C:\Temp\$process`" -ArgumentList $argList -verb runas -Wait") Invoke-Command -ComputerName $computer -ScriptBlock $sb
This will successfully install java.exe (located in C:\Temp) silently (/s) on a remote computer(s). I need to make this work for .MSI packages (and hopefully .MSP as well to have the ability to update things like Adobe Reader). I need the ability to include switches. For example, I would like to install
FlashPlayer.msi /q /norestart
Using the Invoke-Command parameter. I can't use Invoke-WmiMethod since I recently learned this sends data / credentials in clear text whereas Invoke-Command sends data Encrypted.