Hi posseJohn,

Not exactly a script solution, but you can follow the steps in this Msoft article to prevent apps from being reprovisioned during a semi-annual update:
...