List all environment variables in PowerShell

event 2019-11-18 visibility 2,232 comment 0 insights
more_vert
insights Stats
Raymond Raymond Code Snippets & Tips

Code snippets and tips for various programming languages/frameworks. All code examples are under MIT or Apache 2.0 license unless specified otherwise. 

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
More from Kontext
comment Comments
No comments yet.

Please log in or register to comment.

account_circle Log in person_add Register

Log in with external accounts