Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Invoke-Command to install .MSI package

$
0
0

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.



Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>