Environment variables (Windows)
Environment variables in Powershell
Session (temporary) variables
Variables created by set are bound to the current session and not persistent.
$Env:FOO = "example"
$Env:FOOPersistent variables
- GUI: Windows Settings -> Advanced system settings -> Set Environment Variables.
- Powershell:
[Environment]::SetEnvironmentVariable('KEY', 'VAL', 'Machine') - Cmd:
SETX KEY VAL
Last updated on