I'm no PowerShell expert but I've been looking into how to work around this - This old thread seems to have a solution - https://github.com/MicrosoftDocs/windowsserverdocs/issues/580 It says if you run the script as NT AUTHORITY\Local System you can pass the SID of the currently logged in user, so the user does not need to be a local admin to install the script. However the script itself needs to be run as Local System, which the thread suggests doing as a Scheduled Task in Windows. I'm not a huge fan of trying to configure a one-off Scheduled Task and I imagine you could also have a script that just asks for the targeted username and translates that into an SID, or recursively installs for every SID present on the device. Perhaps the latter makes more sense. If I make any progress on modifying your script to support this I'd be happy to pass it onto you - but you might be faster at making this change than myself.
... View more