Hello!
Case:
Retrieving the last date windows was patched to identify edge cases where for some reason windows havent been patched.
I have a script that works for that now:
following text of last "," of concatenation "," of concatenation "," of (string values of properties "InstalledOn" of it) of select objects ("* from Win32_QuickFixEngineering where InstalledOn='" & (month of it as integer as string & "/" & day_of_month of it as string & "/" & year of it as string) of (maximum of (it as date) of (((it as integer as string) of preceding text of last "/" of following text of first "/" of it ) &" "& (preceding text of first "/" of it as integer as month as three letters)&" "& (following text of last "/" of it as integer as string)) of (string values whose (it contains "/") of selects "InstalledOn from Win32_QuickFixEngineering" of wmi)) &"'") of wmi
The format right now is Month/Day_of_month/year
I cant manage to wrap my head around how to change the output of the query to year/month/day_of_month
If i change it to :
following text of last “,” of concatenation “,” of concatenation “,” of (string values of properties “InstalledOn” of it) of select objects ("* from Win32_QuickFixEngineering where InstalledOn=’" & (year of it as string & “/” & month of it as integer as string & “/” & day_of_month of it as string) of (maximum of (it as date) of (((it as integer as string) of preceding text of last “/” of following text of first “/” of it ) &" “& (preceding text of first “/” of it as integer as month as three letters)&” “& (following text of last “/” of it as integer as string)) of (string values whose (it contains “/”) of selects “InstalledOn from Win32_QuickFixEngineering” of wmi)) &”’") of wmi
It fails as refers to non existant object, because i am changing the wrong part im guessing and the it doesnt exist in WMI the way im querying it.
