1.查看系统环境变量

$env :PATH #查看PATH环境变量

2.添加系统环境变量

[Environment]::SetEnvironmentVariable("PATH", $Env:Path + ";<new-value>", "Machine") # 添加到系统变量的 PATH