I know you said open source and free, but PatchMyPC is cheap if you have WSUS or Intune already. Otherwise chocolatey is the closest to your request.
Side note, you can use psexec to span a power shell as system to work with it interactively to understand what’s going wrong. I’m guessing you either need to import a module or make sure the correct powershell version is being invoked.


That train sounds cool.