I need to display all configured environment variables in a PowerShell script at runtime. Normally when displaying environment variables I can just use one of the following
Shorter version:
gci env:* | sort-object name
This will display both the name and value.