Home » Questions » Computers [ Ask a new question ]

PowerShell: can't modify environment variables

PowerShell: can't modify environment variables

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.

Asked by: Guest | Views: 203
Total answers/comments: 1
Guest [Entry]

PowerShell will cache its information. Use the Refresh method to solve your problem. I found this in the SQL area too.