Page 2 of 3

Re: Patch remedy update loop

Posted: Mon Feb 25, 2019 2:14 pm
by Cubert
That's the issue? On line 220 of the else side of script we test for this version and if current we exit script doing nothing. So why does line 220 think that the build is less than that number? Can you add a script log line just after 220 that prints out @CURRENTBUILD@

We need to verify that it truly is matching even though it says only less than.
Capture.PNG
Capture.PNG (4.46 KiB) Viewed 19201 times
As you can see in the image the logic says to exit if a match is made. Is this agent a minority in relation to this issue or are all 1809 agents hitting this test?

It maybe some space or hidden char in the build number breaking the test.

Re: Patch remedy update loop

Posted: Thu Feb 28, 2019 9:25 am
by ObeliskStreet
Hi Cubert, had entered that into the script.

Output from running this morning in chronological order:

10.0.17763.342
10.0.17763.342
1809
Microsoft Windows 10 Pro x64

It has not tried to download again this morning.

Are there any downfalls to leaving Auto Update switched off? We don't really want these applied outside of our patching policy, so if no other downfall to it, I could leave it off.

Re: Patch remedy update loop

Posted: Thu Feb 28, 2019 1:39 pm
by Cubert
Turning off auto update will stop all updates being applied to agents , yes..

Re: Patch remedy update loop

Posted: Thu Mar 14, 2019 8:41 pm
by BlooTech
Cubert wrote: Mon Feb 25, 2019 2:14 pm That's the issue? On line 220 of the else side of script we test for this version and if current we exit script doing nothing. So why does line 220 think that the build is less than that number? Can you add a script log line just after 220 that prints out @CURRENTBUILD@

We need to verify that it truly is matching even though it says only less than.

Capture.PNG

As you can see in the image the logic says to exit if a match is made. Is this agent a minority in relation to this issue or are all 1809 agents hitting this test?

It maybe some space or hidden char in the build number breaking the test.

We're having this same issue with multiple clients as well even with the latest PR update. Literally downloading 150-200GB+ every 24 hours. The file is windows10.0-kb4487017.msu which is different than OP's though. I believe my agents are 1803 though... Would adding "Log: @CURRENTBUILD@" to line 221 on Else end resolve this for me as well you think? Or would I be putting it on line 210 since its 1803 versions that are failing? (or both lines to prevent possible 1809 future issues?). Why is it only us that are having this issue, faulty PR update?

Image

Re: Patch remedy update loop

Posted: Fri Mar 15, 2019 4:33 pm
by Cubert
No,

Patch Remedy reads from your database the OS version and builds. If the database has a space or otherwise hidden char in it the the test fails and the patch is assumed to be needed.

(123 = 123) but (12 3 does not = 123)

Sometimes the agents report differently so we get inconsistent test results. So first we need to identify if that's the case buy visually testing the values.

So to answer your first question, yes creating that line will allow you to see the output we are testing against so you can see if there is anything odd about it.

Post your findings here.

Re: Patch remedy update loop

Posted: Tue Mar 26, 2019 4:12 pm
by BlooTech
Hi Cubert,

Is this what you need? Image

Re: Patch remedy update loop

Posted: Wed Mar 27, 2019 1:03 pm
by Cubert
If that is the print out then I see your issue.

Looks to have a "\cr" between the major and minor numbers

So in your case Automate has collected this data and has a carriage return caught in it. This can be corrected before the tests by inserting a new script line that removes the newline in the middle.

Give me a little while here and I can post the script line that can be added. I will need to play with it and see if I can reproduce the newline for testing.

Re: Patch remedy update loop

Posted: Thu Mar 28, 2019 12:58 pm
by BlooTech
Thank you. Why is automate adding an extra carriage return in my case? I even went as far as fully removing the PR plugin\maintenance script and reinstalled but same issue persists.

Re: Patch remedy update loop

Posted: Fri Mar 29, 2019 1:31 pm
by Cubert
Keep in mind it not the plugin.. We pull that data from what LabTech DB has in it from agent not what we splice together from scans. So when 1 or 2 agents have a extra newline or something it is typically data stored already in the DB. If your able you might test to see if deleting the agent and letting it recreate a new agent ID and populate its data in the database, that the data corrects itself.


If able give that a try and report back here if that had any effect

Re: Patch remedy update loop

Posted: Fri Mar 29, 2019 3:07 pm
by BlooTech
It could just be a LT bug at this point since I can't see any reason why that return is being added. I've been able to get what looks like the right output by combining the powershell commands into one line instead of multiple. I would be leaving everything in the script intact except for how the Current Build variable is set, do you think that would work? I've copied the script contents below

Code: Select all

$ubr=(Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name UBR).UBR
$build=(Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name CurrentBuildNumber).CurrentBuildNumber
"$build.$ubr"