by j07070 at 2012-12-17 09:53:04
I’'m surprised to see very few examples, if any, leveraging Powershell to launch msiexec using switches, logging & the like for a Windows 7 Professional, 64 bit corporate environment.by coderaven at 2012-12-17 12:38:44
Am I just overlooking it or is it simply too painfully obvious to document some examples of this (or again, have I missed where these might be posted, as well)?
There are so many ways to start a remote task on a computer, that many do not use msiexec as the example process. Just like running notepad on a remote system, msiexec would be the same, just in 's so that the switches would not cause a syntax error. When it comes to PowerShell, you can use Inovke-WMIMethod and call the Create method of the Win32_Process class or if you environment is configured for PowerShell remoting, you can use that. If I wanted to execute msiexec on a remote system and all the files were sitting on the C: waiting for me, I could do something like this:
Invoke-WMIMethod -Class Win32_Process -Name Create -ArgumentList 'msiexec /iC:\installs\myapp.msi /qb’
as just a very basic example.