Display all environment variables from a running PowerShell script
Shorter version:
gci env:* | sort-object name
This will display both the name and value.
Shortest version (with variables sorted by name):
gci env:
Shorter version:
gci env:* | sort-object name
This will display both the name and value.
Shortest version (with variables sorted by name):
gci env: