you might want to look at Installing in user profiles - ActiveSetup vs. Execute-ProcessAsUser - The Toolkit / Tips & Tricks - PSAppDeployToolkit Community
I’m a proponent of using ActiveSetup but I’m noticing most people are using Execute-ProcessAsUser even with its limitations.