How to print environment variables to the console in PowerShell?

I’m starting to use PowerShell and am trying to figure out how to echo a system environment variable to the console to read it.

Neither of the below are working. The first just prints %PATH%, and the second prints nothing.

echo %PATH%
echo $PATH

4 Answers
4

Leave a Comment