I have an environment variable set via "system properties -> advanced -> Environment Variables". I modified the variable's value. In cmd, I see the new value. In PowerShell, the value is still the old value. Trying to set it with [Environment]::SetEnvironmentVariable doesn't have any effect.
|
feedback
|
|
PowerShell will cache its information. Use the Refresh method to solve your problem. I found this in the SQL area too. | |||||
feedback
|
|
Did you launch a new instance of PowerShell? Every process gets its own environment block when it starts. Typically it gets a copy of the parent process environment block, but CreateProcess can also take a custom one. This means that changes to the system environment won't affect running processes. So you'll need to start a new one. | |||
|
feedback
|