pwsh-刷新环境变量

刷新环境变量

code $profile

1
2
3
4
function RefreshEnv {
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
Write-host('RefreshEnv')
}