Page 1 of 1

Data dictionary? Launch OS Upgrade via scripting?

Posted: Wed Jul 14, 2021 2:59 pm
by NCCShipley
Hi all - anyone have a data dictionary or table layout for the Patch remedy tables? I need to write some scripts based on data I find in the OS Upgrade Log, like if it says "failed to download ISO" then I want a script that will check the hash of a windows ISO in the appropriate folder for validation, then if it's not valid (or existent), download the appropriate .ISO from our s3 bucket.

I would also like to launch the OS Upgrade script via scripting instead of just the Patch Remedy interface. How can I call that correctly from my own Automate script to imitate "Attempt OS Upgrade now"? Too many systems to update for this PrintNightmare mitigation (many systems were still at 1909 and 1903) for us to manually push things through PatchRemedy - though we don't mind on smaller scales.

Re: Data dictionary? Launch OS Upgrade via scripting?

Posted: Wed Jul 14, 2021 3:01 pm
by NCCShipley
We are cloud hosted by ConnectWise, so I don't have direct access to the databases on our Automate server.

Re: Data dictionary? Launch OS Upgrade via scripting?

Posted: Wed Jul 14, 2021 5:01 pm
by NCCShipley
I was able to leverage the Report Designer in Automate to discover the data fields and do a little exploration in the data available from the plugin. For those interested the tables all begin with the same prefix: plugin_sw_patch_remedy

Still could use to figure out how to launch the Patch Remedy OS Upgrade via my own scripting, but at least I can manipulate the data in it now to set up systems to upgrade at the configured day/time of night and ensure the best chance of success without having to manually work around the interface.

Re: Data dictionary? Launch OS Upgrade via scripting?

Posted: Wed Jul 14, 2021 6:14 pm
by NCCShipley
I think I answered my own question about launching OS upgrade module from Patch Remedy via my own scripting.

First, set the value of a variable @MYCMD@ to WIN10OSUPGRADE, then launch Patch Remedy Maintenance function.

That lets me keep the configuration aspects from the GUI, but I can launch it quick as a result of my own scripting