You run it as Backgroud script and use the output JSON to run the CI/CD APIs. After you run it, instructions are shown at monitor.
You should never run this in PROD directly. You want to run this as part of a more structured Instance Upgrade projec...
While the above script works fine, I stumbled upon some limitations/issues:
Simply comparing that "latestVersion != installedVersion" can lead to downgrades instead of upgrades in some situations. This is happening because the "grSSA.orderBy('version...
You probably still miss some of the certificates on the chain. Have a look here to understand how to troubleshoot or how to manage MID server security policies override that are specific for you endpoint.
If you do not want to disable the Certificate Chain Check for the whole intranet, you can either:
Add an overriden security policy for specific for your end-point (see here)do some troubleshooting to find the missing certificate in the MID server cac...