Does it work when executed directly on that one host?

In terms of “other methods” did you look at the PowerShell that the 
WindowsUpdate PS module uses for the same functionality?

I’m pretty sure that pre-Win10/Server2016 there is a COM object that PowerShell 
can manipulate to do this stuff.

From: [email protected] [mailto:[email protected]] On 
Behalf Of Michael Leone
Sent: Tuesday, January 23, 2018 3:26 PM
To: [email protected]
Subject: [powershell] Can't get WMI info from Win 2008 (not R2)

So this is weird. I have a script that uses

Get-WMIObject -Class Win32_QuickFixEngineering -ComputerName $Computer -Filter 
"HotFixID != 'File 1'"| ? {$_.InstalledON} |sort InstalledOn | select -last 1

Now, this works on all my hosts (albeit slowly). But I have 1 host, Win 2008 
(not R2) where this just returns nothing. No error, no date, nothing. I even 
turned off the Windows Firewall, and still nothing.

Am I missing something basic here? Why would this not work on Win 2008 R2, and 
would work on Win 2008 R2/Win2012/Win2012 R2? It should be returning a date.

Thanks

(as an aside, any suggestions for a better way to get the last update 
installation date would be appreciated. This would need to run on any 
Powershell v2 or higher, and without any other PS modules installed - my techs 
need to run this script, and they don't anything about PS or installing 
modules, etc)







Reply via email to