How To Find Out All Environment Variables on Windows

Environment Variables, according to a better definition on Wikipedia, are a set of dynamic named values that can affect the way running processes will behave on a computer. For example, a running process can query the value of the TEMP environment variable to discover a suitable place to store temporary files, or the AppData variable to find a quick way to get access to the Roaming folder in the user’s profile folder.

In Windows, there are a few ways to discover how many of them are available and what their values are. It’s always good to discover what you can use right out of the box, isn’t it?

Through Control Panel

Search “Advanced” in Control Panel, and click View advanced system settings to Open System Properties dialog box. Advanced tab is automatically selected.

System Properties 2014 06 30 12 08 12 - Windows Quick Tip: How To Find Out All My Environment Variables

And click Environment Variables button to show what are available?

Environment Variables 2014 06 30 12 16 18 - Windows Quick Tip: How To Find Out All My Environment Variables

Unfortunately, this lists most of the available variables but not all. Besides, it’s quite tedious going through multiple steps to get that information. Here is a better way

Through Command Prompt window

Simply open up a Command Prompt window, and fire up a command SET, you will have a complete list of Environment Variables and their values right away.

Command Prompt SET to show the variables 600x420 - Windows Quick Tip: How To Find Out All My Environment Variables

Nice, quick, and yet, there is even a better way.

Through PowerShell

To read an Environment Variable in PowerShell, simply use the prefix “$env:“, follow by the name of the variable. What’s better is that this prefix env is actually a drive so you can use a simple cmdlet such as dir to find and list all Environment Variables at once.

PS> dir env:

Windows PowerShell dir env to list all environment variables 600x300 - Windows Quick Tip: How To Find Out All My Environment Variables

Pretty cool and nicely organized.

Ref: Windows Quick Tip: How To Find Out All My Environment Variables – NEXTOFWINDOWS.COM