I have an analysis that is pulling installed Windows patches from WMI. I believe I used the sample relevance from here or bigfix.me. Anyway, this part is working fine:
((string value of property "InstalledOn" of it), (string value of property "HotFixID" of it), (string value of property "Description" of it)) of select objects "* from Win32_QuickFixEngineering" of WMI
It returns all installed Windows patches and hotfixes however, I cannot figure out how to filter this result for just the last years worth of data for an audit report.
Using the “InstalledOn” property in the debugger the ‘string value’ results show as “1/5/2016” format. If I change the query to “time value” it returns as universal time, “Tue, 05 Jan 2016 00:00:00 -0400”
I’m only filtering on the date so:
(“Tue, 05 Jan 2016 00:00:00 -0400” as universal time) >= (now - 8760*hour)
= True
AND
((time value of property "InstalledOn" of it) whose(it >= (now - 8760*hour)) of select objects "InstalledOn, HotFixID, Description from Win32_QuickFixEngineering" of WMI)
filters on the date correctly. But when I put it all together:
( ( (time value of property "InstalledOn" of it) whose(it >= (now - 8760*hour) ), string value of property "Description" of it, string value of property "HotFixID" of it ) of select objects "InstalledOn, HotFixID, Description from Win32_QuickFixEngineering" of WMI)
I get “Singular expression refers to nonexistent object.” All of the pieces work individually I just don’t see where the problem is.
Any guidance would be appreciated.
Thanks,
Ty