Echo %path% on separate lines? Echo %path% on separate lines? powershell powershell

Echo %path% on separate lines?


Try:

 ($env:Path).Replace(';',"`n")

or

$env:path.split(";")


Fewer keystrokes using either the split operator or method

$env:Path -split ';'$env:Path.split(';')


this works for me (in a cmd window):

powershell -Command ($env:Path).split(';')