问题
使用不用方式启动的 Powershell 得到的环境是不同的。通过以下命令查看。可将系统路径(Machine)和用户路径合并后设置未当前的环境变量
>> $env:path
解决
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
使用不用方式启动的 Powershell 得到的环境是不同的。通过以下命令查看。可将系统路径(Machine)和用户路径合并后设置未当前的环境变量
>> $env:path
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。