Powershell get-childitem env:path 返回省略的一行,如何有一些有用的东西?

Gui*_*ume 4 powershell

我想知道我的路径变量的内容是什么,所以我运行了这个命令:

D:\> Get-ChildItem env:path

Name                           Value
----                           -----
Path                           %SystemRoot%\system32\WindowsPowerShell\v1.0\;D:\java\jdk\javaFX2.0\bin;C:\Program Files (x86)\PuTTY;C:\Perl64\site\bin;C:\Perl64\bin;C:\Program Files (x86)\PHP\;C:\oraclexe\app\oracle\product\10.2.0\serve...
Run Code Online (Sandbox Code Playgroud)

问题是结果是毫无用处的。

我如何才能拥有纯文本且没有省略号?

EBG*_*een 8

powershell 中的一切都是一个对象。如果你想获得 Path 环境变量的值,你必须访问它:

(Get-ChildItem env:path).Value
Run Code Online (Sandbox Code Playgroud)