DEV Community

JameslineDev
JameslineDev

Posted on

PowerShell Tip: Use PowerShell to Display Windows Path

Use the $env PS Drive and retrieve the value of the Pathvariable. By default, it displays as a continuous string, and it can be a bit difficult to read. Here is the command:

$env:path
Enter fullscreen mode Exit fullscreen mode

But if you use the –split operator to break the strings at the semicolon, it is more readable:

$env:path -split “;”
Enter fullscreen mode Exit fullscreen mode

Top comments (0)