I am able to get the install date of the OS using the following relevance:
(now - it) of unique values of (it * second + “01 Jan 1970 00:00:00” as local time) of (it as string as trimmed string as integer) whose(0 != it) of values “InstallDate” of keys “HKLM\Software\Microsoft\Windows NT\CurrentVersion” of (x64 registries;x32 registries)
How can I use this to get all systems with install date less than 5 days?
1 Like
Wrap it in parenthesis and do < (5 * day)
you’ll get an error about the “Unique Values” you can fix if you just use, “Unique Value”
((now - it) of unique value of (it * second + "01 Jan 1970 00:00:00" as local time) of (it as string as trimmed string as integer) whose(0 != it) of values "InstallDate" of keys "HKLM\Software\Microsoft\Windows NT\CurrentVersion" of (x64 registries;x32 registries)) < (5*day)
1 Like
Thank you… I had tried that but was getting the error as you stated. Again thank you for your quick response.
When you use “Unique Values” you’re using a plural (the s at the end of unique value) which means you are expecting 0 or more answers (maybe 0, maybe 10, maybe 500).
So (Plural Time) < (Singular Time)
which is like saying in english 200 Days,300 Days is greater than 250 Days)
which has neither a true or a false answer.
We can turn your statement singular by saying, “Unique Value” which forces it to be singlar.
1 Like
So since I am comparing only one value then it has to be singular? Do I understand that correctly?
When you do a comparison you do need singular items on each side of the comparison:
Q: 5 < 3
A: False
Q: 5 < (5;3)
E: A singular expression is required.
Q: (5;3) < 3
E: A singular expression is required.
Q: (5;3) < (5;3)
E: A singular expression is required.
I am trying to build a baseline around the relevance of a workstation OS install date so it will apply to any new machine that has the OS /BES client installed after today. Would I be able to use this as that relevance with the default dates 01 1970 or do I modify that to today’s date and say >1? I’m very new to BF and just want to make sure that I am using this correctly to get the results I am looking for.
My challenge is that when I create baselines, they are set to apply to a specific workstation group and as I set expiration dates, I would like to keep some open for new builds so they get the fixlets applied prior to any other installations/updates.
Any help would be greatly appreciated.