PowerShell: Show Path Environment Variable

By Xah Lee. Date: . Last updated: .

Show Value of Environment Variable PATH

Show the value of environment variable path:

# show env var of Path, of current User, from registry
[environment]::GetEnvironmentVariable("path", "User") -split ";"
# show env var of Path, of current Machine, from registry
[environment]::GetEnvironmentVariable("path", "Machine") -split ";"
PowerShell show path env var 2024-01-03
PowerShell show path env var 2024-01-03

PowerShell: Environment Variable