2016 and 2019 compliance status

I am looking for an RP creation for 2016 and 2019. Below are the logic and i am unable to create analysis based on below logic it will be great if some one can help me.

Installed date
q: (("1 Jan 1601 " as date + ((value “InstallTimeHigh” of it as integer * 4294967296 + value “InstallTimeLow” of it as integer) / 10000000 * second )) of it as string | “No install record”) of (keys (unique values of names of values of keys “Owners” of keys whose (name of it starts with “Package_for_RollupFix~” and (value “CurrentState” of it as integer is contained by set of (112;128))) of it) of it) of keys “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages” of native registry
A: Thu, 28 Jan 2021
T: 214.382 ms

compliance status logic
Parameter PT= if current date <= Current Patch Tuesday then last month patch Tuesday else Current patch Tuesday
Compliance Status =if installed date < (Parameter PT) then Not Compliant else Compliant

Current patch Tuesday
(if (it > current date) then (it) else ( (it + 7day) of first tuesday of month_and_year of (current date ) ) ) of ( (it + 7day) of first tuesday of month_and_year of current date )
Lats patch Tuesday
(if (it > current date) then (it) else ( (it + 7day) of first tuesday of month_and_year of (current date - 1 * month ) ) ) of ( (it + 7day) of first tuesday of month_and_year of current date )

:slight_smile:

Q:` if (current date <= ((if (it > current date) then (it) else ( (it + 7*day) of first tuesday of month_and_year of (current date ) ) ) of ( (it + 7*day) of first tuesday of month_and_year of current date))) then ((if (it > current date) then (it) else ( (it + 7*day) of first tuesday of month_and_year of (current date - 1 * month ) ) ) of ( (it + 7*day) of first tuesday of month_and_year of current date)) else ((if (it > current date) then (it) else ( (it + 7*day) of first tuesday of month_and_year of (current date ) ) ) of ( (it + 7*day) of first tuesday of month_and_year of current date ))`
A: Tue, 09 Feb 2021
T: 166.306 ms

Q:if (((day_of_month of it as string & "/" & (month of it as integer as string) & "/" & year of it as string) of (("1 Jan 1601 " as date + ((value "InstallTimeHigh" of it as integer * 4294967296 + value "InstallTimeLow" of it as integer) / 10000000 * second ))) of it as string | "No install record") of (key (unique values of names of values of keys "Owners" of keys whose (name of it starts with "Package_for_RollupFix~" and (value "CurrentState" of it as integer is contained by set of (112;128))) of it) of it) of key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages" of native registry) < (if ((day_of_month of it as string & "/" & (month of it as integer as string) & "/" & year of it as string) of current date) <= ((day_of_month of it as string & "/" & (month of it as integer as string) & "/" & year of it as string) of (if (it > current date) then (it) else ( (it + 7*day) of first tuesday of month_and_year of (current date ) ) ) of ( (it + 7*day) of first tuesday of month_and_year of current date)) then ((day_of_month of it as string & "/" & (month of it as integer as string) & "/" & year of it as string) of (if (it > current date) then (it) else ( (it + 7*day) of first tuesday of month_and_year of (current date - 1 * month ) ) ) of ( (it + 7*day) of first tuesday of month_and_year of current date )) else ((day_of_month of it as string & "/" & (month of it as integer as string) & "/" & year of it as string) of (if (it > current date) then (it) else ( (it + 7*day) of first tuesday of month_and_year of (current date ) ) ) of ( (it + 7*day) of first tuesday of month_and_year of current date ))) then "Not Compliant" else "Compliant"
A: Compliant
T: 133.093 ms

2 Likes

Looks like date comparison is not working date taken as string and it is not comparing