PowerShell 资源

GitHub:https://github.com/PowerShell

GitHub:https://github.com/PowerShell/powerShell-Docs.zh-cn

文档:https://docs.microsoft.com/zh-cn/powershell/scripting/powershell-scripting?view=powershell-6

读取系统环境变量

1
$ echo $env:Temp

永久生效

就像我们在图形界面设置的一样

1
$ [environment]::SetEnvironmentvariable("a", "1", "User")

常用变量

$PSScriptRoot 文件所在路径

0%