You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 29, 2026. It is now read-only.
See the issue here.
Consider the below method instead.
$key=Get-Item'HKCU:\Environment\'# Will get the non-expanded values$existingPath=$key.GetValue('PATH','','DoNotExpandEnvironmentNames')
$newPath="${existingPath};%TEST_VAR%"$key.SetValue('PATH',$newPath,'ExpandString')
Expected behavior
`$env:Path` maintains itself as an expand registry key.
Actual behavior
`$env:Path` is converted from the registry expand type.