windows 10 powershell 下设置环境变量

$Env:<variable-name> = "<new-value>"

实例如下

$Env:test = "test"

然后执行

Get-ChildItem Env:

看到你设置的环境变量 表示设置成功

参考文章:
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_environment_variables?view=powershell-6

posted @ 2020-08-13 15:05  bytehello  阅读(37)  评论(0)    收藏  举报  来源