Setting Windows PowerShell environment variables

If, some time during a PowerShell session, you need to see or to temporarily modify the PATH environment variable , you can type one of these commands:

$env:Path                             # shows the actual content
$env:Path="C:\foo;" + $env:Path     # attach to the beginning
$env:Path += ';C:\foo'                # attach to the end

Leave a Comment