FG
💻 Software

PowerShell: can't modify environment variables

Fresh5 days ago
Mar 15, 20261714 views
Confidence Score0%
0%

Problem

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.

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: PowerShell: can't modify environment variables

Low Risk

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

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment