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

working with git: archive
Aug 5, 2025

working with git: archive

read more →
Surprise Driven Development
Jul 10, 2025

Surprise Driven Development

read more →
What's in a .git? A Deep Dive into Git's Hidden Engine
Jun 3, 2025

What's in a .git? A Deep Dive into Git's Hidden Engine

read more →
Git Worktrees: Multiple Branches, Zero Context Switching
May 30, 2025

Git Worktrees: Multiple Branches, Zero Context Switching

read more →
Walking Back with Git: HEAD^ vs HEAD~ Demystified
May 29, 2025

Walking Back with Git: HEAD^ vs HEAD~ Demystified

read more →
New Project Release: Pride Flags
May 5, 2025

New Project Release: Pride Flags

read more →
the field notes

recently written