Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 4
    Even if I don't use PowerShell because it doesn't work for every cmd command, this is the only solution for a pretty printing (on 2 columns) without big efforts. To achieve the same behavior in cmd, you need something like this for /f "tokens=1,2 delims==" ... which becomes very complicated ... Commented Jan 14, 2016 at 9:12
  • 7
    To avoid output being truncated, I would use the following: Get-ChildItem Env: | Format-Table -Wrap -AutoSize Commented Nov 13, 2017 at 11:50
  • 5
    gci env: instead Get-ChildItem Env:, easier to remember Commented Sep 26, 2019 at 11:35
  • dir env: I find even easier to remember Commented Jun 18, 2024 at 13:52
  • Question specifically asks for a solution using command prompt, not powershell Commented Apr 3 at 22:37