How To View PowerShell Environment Variables

In this Wednesday blog post, I will show how to view your PowerShell environment variables and understand why they are so important.

PowerShell Environment Variables

By default, PowerShell is using environment variables to store information about the operating system version, paths, system configurations and more.

These variables tell PowerShell where things are located and which default values to use. for example, the temp folder location is configured in the environment variables.

How To View Your Environment Variables

To view your environment variables with PowerShell 7, open you the console and type the following cmdlet.

Get-ChildItem -Path Env:\

If you look at the output, you will see all your system environment variables that PowerShell will use without asking you to provide any input about them.

You can also access specific environment using the following cmdlet.

$Env:windir  

To view you PATH variables type the following cmdlet.

$env:Path

Add Item to the PATH variables I will use the following cmdlet

$Env:Path += ";c:\ssh"  

Processing…
Success! You're on the list.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.