Profiles
Environment variable
To set an environment variable for the current Shell session only:
# Assign
$env:MyVar="My Value"
# Display
$env:MyVar
shell powershell
To set an environment variable for the current Shell session only:
# Assign
$env:MyVar="My Value"
# Display
$env:MyVar