Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to know what is the content of my path variable, so I ran this command:

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...

The problem is that the result is quite useless.

How can I have it plain text and without ellipsis ?

share|improve this question
up vote 5 down vote accepted

Everything in powershell is an object. If you want to get the Value of the Path environment variable you have to access that:

(Get-ChildItem env:path).Value
share|improve this answer
I was aware of the object orientation of powershell, but I did not have a clue about the .Value to get a text representation. Thanks a lot. – Guillaume Aug 14 '12 at 13:24
Normal object oriented stuff. Most every language that I am aware of uses dot notation to access the properties and methods of an object. In this case the only tricky bit is that you are accessing a property of an anonymous object rather than assigning it to a variable then accessing it like this: $foo = Get-ChildItem env:path; $foo.Value – EBGreen Aug 14 '12 at 13:29
is there an alternative something like $object | get-childitem env:path | format-list ? – whytheq Feb 7 at 22:30

Below command shows the full PATH info instantly.

PS D:\> $env:path
share|improve this answer
Could you explain why this is better? – Daniel Beck Apr 8 '13 at 20:44
This is not a better solution but showing PATH value without ellipsis. I changed my comments to avoid confusion. – Ikhoon Chon Apr 9 '13 at 10:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .