Install an .MSI package via WMI
(Get-WMIObject -ComputerName $TargetSys -list | Where-Object -FilterScript {$_.Name -eq "Win32_Product"}).PSBase.InvokeMethod("Install","\\AppSrv\dsp\NewPackage.msi")
May the PoSH Be with you,
Powershell Jedi
Tuesday, December 9, 2008
Subscribe to:
Post Comments (Atom)
5 comments:
This will be much more efficient:
([wmiclass]'\\$computer\root\cimv2:win32_product').Install($msi)
Man, your such a big help, I think I'm going to call you Yoda, LOL!!
$a=([wmiclass]"\\$computer\root\cimv2:win32_product").Install($msi)}
Post a Comment