powershell set env code example
Example 1: powershell set environment variable
# Windows PowerShell
PS C:\> $env:VAR_NAME="VALUE"
Example 2: powershell add to env path
$env:Path = "SomeRandomPath"; (replaces existing path)
$env:Path += ";SomeRandomPath" (appends to existing path)
Example 3: powershell environment variables set
$Env:<variable-name> = "<new-value>"