PowerShell command to retrieve Windows environment variables
Question
How can I retrieve a list of environment variables for Microsoft Windows?
Answer
You can run the command below in PowerShell to retrieve the environment variables for windows:
Get-ChildItem Env: | Format-Table -AutoSize
Was this helpful?
© 2026 Flexera. All rights reserved.