powershell - 打印变量的路径

标签 powershell cmd

在powershell中打印环境变量的命令是什么?在cmd中它是%path%,但在powershell中对我不起作用

最佳答案

使用命令Get-ChildItem Env:获取所有环境变量。如果只需要路径,请使用Get-ChildItem Env:Path

关于powershell - 打印变量的路径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38538585/

相关文章:

c# - 哪个更适合用于重复性工作 : Service or Scheduled Task?

windows - 将 cmd stdout 和 stderr 重定向回父级

android - 如何接受 flutter doctor 的许可?

powershell - DSC 包资源具有相同的关键属性

powershell - 显示匹配行的前后 N 行?

powershell - 如何阻止 Powershell 命令 `Get-NetFirewallRule` 抛出错误?

bash - 如何从 Cygwin 调用 bat/cmd 文件并继承变量?

powershell - 如何在PowerShell中的注册表项上使用getauditrules()获取ACL对象中的审核规则?

windows - Powershell 获取凭据失败

batch-file - 如何从执行的批处理文件中获取值