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

Notebooks, datasets and API keys: making git behave for data work
Nov 24, 2026

Notebooks, datasets and API keys: making git behave for data work

read more →
A git GUI for people who live in the terminal
Nov 23, 2026

A git GUI for people who live in the terminal

read more →
A git client your security team has nothing to ask about
Nov 20, 2026

A git client your security team has nothing to ask about

read more →
Three of me in one git log: keeping identities apart with includeIf
Nov 19, 2026

Three of me in one git log: keeping identities apart with includeIf

read more →
A free git client for private repos and self-hosted git
Nov 18, 2026

A free git client for private repos and self-hosted git

read more →
Your giant repo is slow because nobody tuned git
Nov 17, 2026

Your giant repo is slow because nobody tuned git

read more →
the field notes

recently written