使用不用方式启动的 Powershell 得到的环境是不同的。通过以下命令查看。可将系统路径(Machine)和用户路径合并后设置未当前的环境变量
>> $env:path
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
Powershell 无法识别Path Powershell 如何更新Path
原文:https://www.cnblogs.com/heenhui2016/p/13027172.html