I have a script that run with administrator privileges (as the Admin user) while I’m logged in as a regular user (“john”).
I would like to make the script change my regular user (“john”) env var.
How can I choose to which user
[Environment]::SetEnvironmentVariable sets the variable? I really don’t want to make several scripts and run them individually per user.