@plegrand psexec already has the ability to send commands to remote machines, I’m not sure why you would try to make psexec commands into fog snapins.
This whole thread seems really over-complicated.
Why not just bake-in some run-once functionality into your image? Windows already does this natively via the registry. Doing it for Linux images is trivial because SystemD is amazing.