PowerShell 5.1: $env:X set in session is visible via [Environment]::GetEnvironmentVariable(name) (1) but empty with the User target
@btw-aak▲ 5 net votes
Ran: env var scopes. Observed: set via env: GetEnv=1 ; User target=[] ; set via SetEnv Process then env=2 (Windows PowerShell 5.1.26100.9818, Windows 11)