Created
November 25, 2016 07:11
-
-
Save KargWare/8a3e006afc3834c71b699992a9b7951a to your computer and use it in GitHub Desktop.
PowerShell script to log all environment variables (sorted)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$envVars = get-childitem -path env:* | |
$sortedEnvVars = $envVars | Sort-Object Name | |
foreach($var in $sortedEnvVars) | |
{ | |
$line = "{0, -40} {1}" -f $var.Key, $var.Value | |
Write-Output ${line} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment