Page 1 of 1

Global Defaults

Posted: Fri Jul 08, 2022 8:39 am
by NathanWilson
Hello!

Is there any way to set PatchRemedy defaults for all clients? I.e Feature Updates monthly on X day? I know we can do this per client but the plugin on our cloud hosted Automate is painfully slow, so I'd rather do this in one go if possible?

Also when I went through them all and changed weekly updates from the default of Sunday to Thursday it wouldn't apply and just reverted back to Sunday?

Finding it quite difficult to manage the enterprise without hand holding individual clients so hopefully I'm just missing a trick! :)

Kind Regards
Nathan

Re: Global Defaults

Posted: Fri Jul 08, 2022 12:53 pm
by Cubert
You can do that via a simple script when your hosted or via SQLYog if hosted on premise.

Create a script that is one line lone. Use a single SQL Execute script function and place the following SQL query in function to execute.

Code: Select all

UPDATE `plugin_p4a_patch_remedy_agent` SET WUScheduleInterval = 'Weekly', WUScheduleDay = '3'

It will go and update all agents managed by patch remedy to do updates on Wednesdays. If you only want workstations and not servers as well then add to the end of that query the following extra code.

Code: Select all

WHERE OS NOT LIKE '%server%'


this will then only change the day of week for agents that do not have server in their OS titles.



As for the not saving settings issue, what version are you currently on for PR?

We are currently on 1.0.5.10 located here

https://delivery.shopifyapps.com/-/a033 ... 35fa38e8ca

Re: Global Defaults

Posted: Fri Jul 08, 2022 1:21 pm
by NathanWilson
Thanks Cuthbert!

When I checked in the Schedule upgrades it says Sunday, when when I check the device schedule in the plugin, where it shows OS info etc, it says Thursday so I guess its just the schedule element defaulting to sunday? Not the actual schedule itself.

Thanks for the script that's perfect, so eventually I think we're going to be doing firmware updates Thursdays weekly, and Feature updates once a month, is the feature update bit also achievable?

SET FUScheduleInterval = 'Monthly' I assume?

Many thanks!

Re: Global Defaults

Posted: Fri Jul 08, 2022 1:23 pm
by Cubert
The above was for Windows updates, if your looking to do OS upgrades for all workstations running windows 10 then regularly then here is a simple script that if you set to execute once and only once per month on one agent only then it will schedule all OS 10 agents for OS Upgrades each time its run.

It schedules the agents for the next day at the same time script is run.

Example: You want to have all Windows 10 agents attempt an OS features upgrade on the 15th of the month at 10 PM. Then select a single agent and setup a schedule to execute this script once a month on the 14th at 10 pm. This will cause the script to schedule all windows 10 agents for upgrades.

Actually it will schedule all agents to do upgrades but the first line of upgrade script is to exit if not windows 10 or 11 so it will only run on windows 10 agents and not servers or lower OS versions. You can modify the SQL to filter out any OS types or other related info if you like. This script is to just show the basic example.


Modify as needed.

PatchRemedy5 Set Upgrade schedule.zip
(1.47 KiB) Downloaded 119 times

Re: Global Defaults

Posted: Fri Jul 08, 2022 1:26 pm
by Cubert
If you wat to set the standard updates to monthly as well then change the "Weekly" to Monthly and the day of week becomes day of month so instead of 0-6 it can now be 1-30.

Re: Global Defaults

Posted: Fri Jul 08, 2022 1:39 pm
by NathanWilson
Hero! Thanks Cuthbert much appreciated :idea: