Skip to main content
← back to field notes
One min readDevelopment

Display all environment variables with powershell

developmentpowershellenvironmentscripts

When configuring a development environment, you can use the PowerShell command to display all environment variables. This can be useful for gathering information about the environment, or for debugging.

(Get-ChildItem env:*).GetEnumerator() | Sort-Object Name | Out-String

Tips-and-Tricks​

If you wish you can all adjust the script above to send the output to a filterable grid window.

(Get-ChildItem env:*).GetEnumerator() | Sort-Object Name | Out-GridView

Or you can send it directly to the clipboard to be pasted into a file.

(Get-ChildItem env:*).GetEnumerator() | Sort-Object Name | clip

Of course, you need to have PowerShell installed on your machine. On Windows, when possible, I recommend installing PowerShell from the Microsoft Store; This will be easier to manage and keep up to date.

On Linux, you can install PowerShell from the official repositories Specific instructions are available here: [https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell]

field notes

you may also enjoy

more from this thread of thought

Introducing Git Revenge, and whether you should use it
Nov 5, 2026

Introducing Git Revenge, and whether you should use it

read more →
The cost of maintaining open source
Oct 27, 2026

The cost of maintaining open source

read more →
Is there a future without AI?
Oct 25, 2026

Is there a future without AI?

read more →
Introducing "Ink and Agency" a skill pack for humans (and claude)
May 18, 2026

Introducing "Ink and Agency" a skill pack for humans (and claude)

read more →
working with git: archive
Aug 5, 2025

working with git: archive

read more →
Surprise Driven Development
Jul 10, 2025

Surprise Driven Development

read more →
the field notes

recently written