I recently ran into this issue where I create an environment variable with PowerShell using the following commands and then when I check I still don’t see the variable under System Properties > Environment Variables > User or System variables.
PS C:\WINDOWS\system32> cd env:
New-Item -Name ENV1 -Value “C:\Program Files\env”
PS Env:> dir
ENV1 C:\Program Files\env
No such a variable shows under System or User Variables in GUI.
does anyone have the same experience or a solution? I tried this on Windows 7 and 8. with PowerShell 3.0 and 4.0