access_time 3 years ago languageEnglish

List environment variables in PowerShell

visibility 39 comment 0

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
info Last modified by Raymond 3 years ago copyright This page is subject to Site terms.
Like this article?
Share on

Please log in or register to comment.

account_circle Log in person_add Register

Log in with external accounts

Follow Kontext

Get our latest updates on LinkedIn.

Want to contribute on Kontext to help others?

Learn more

More from Kontext

visibility 566
thumb_up 0
access_time 4 years ago
visibility 20112
thumb_up 1
access_time 4 years ago
visibility 83
thumb_up 0
access_time 3 years ago