Is there a best practice for creating a user environmental variable in LDMS 2016? I have an install that needs to set a variable, but won't run as current user, so I thought I'd bundle it with a custom Windows Action package, or a powershell package that runs something like:
[Environment]::SetEnvironmentVariable("TestVariable", "Test value.", "User")
If I run a powershell script it (understandably) fails to make a change because of the execution policy on endpoints, which is NOT "Unrestricted"
A custom Window action reports success, but doesn't appear to create the variable.
Any thoughts, or has anyone got a good solution?