1
1
I'm attempting to push a windows hotfix to a number of computers on our network, using PowerShell v3. I've downloaded the appropriate .msu
file, I've been able to successfully install it from the local machine on the command line, using:
wusa c:\temp\hotfixname.msu /quiet /norestart
The problem comes when I try to run it from powershell. We can assume that the msu is already on everyone's machine, at c:\temp\hotfixname.msu
, and that PSRemoting is already enabled. Here's what I have more or less:
import-module ActiveDirectory
$AllPCs = Get-ADComputer -SearchBase "Appropriate OU Here" -filter *
$AllPCs | Foreach {
Invoke-Command -ComputerName "$($_.name)" -AsJob -ScriptBlock {
if (!(Get-HotFix -id hotfixkb)) { CMD /C "wusa.exe c:\temp\hotfixname.msu /quiet /norestart" }
}
}
When run like this from my own admin box, running powershell as admin, the local machine opens a wusa.exe
process for a second or so, before it disappears. Nothing is installed.
I can run CMD /C "wusa.exe /?
, and it does open the process (it hangs, but only because wusa
opens its help in a GUI).
I'm out of ideas - does anyone have any advice on this? Is there something I'm missing?
2We wound up running a scheduled task to force the local PC to run wusa.exe, which seemed to do the trick! – bjscollura – 2015-03-27T22:00:33.487