Windows set environment variable permanently

Date: 2018-10-16

Source: https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc755104(v%3dws.10)

:: local vars
set proxy=http://proxy.lan:8080
set noproxy=127.0.0.1,::1,localhost,.lan,.local
:: set machine environment variable
setx HTTP_PROXY %proxy% /m
setx HTTPS_PROXY %proxy% /m
setx NO_PROXY %noproxy% /m




## List environment variables

# cmd
set | more

# in powershell
Get-ChildItem Env:
# or fancy:
Get-ChildItem Env: | Format-Table -Wrap -AutoSize

14520cookie-checkWindows set environment variable permanently