List all environment variables in PowerShell

Raymond Tang Raymond Tang 0 2365 1.06 index 5/28/2019

Environment variables are commonly used in many frameworks or programs.

In PowerShell, we can use Get-ChildItem cmdlet to retrieve all the environment variables.

You can also use Get-ChildItem Env:$VariableName to retrieve the value of certain environment variable.

Code snippet

Get-ChildItem Env:
Get-ChildItem Env:PATH
powershell

Join the Discussion

View or add your thoughts below

Comments