set system variables powershell windows 10 code example Example: powershell set environment variable # Windows PowerShell PS C:\> $env:VAR_NAME="VALUE"