Skip to content

Instantly share code, notes, and snippets.

@Iristyle
Created October 29, 2012 15:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Iristyle/3974243 to your computer and use it in GitHub Desktop.
Save Iristyle/3974243 to your computer and use it in GitHub Desktop.
Get a list of user environment variables
# Note that this only works for user keys that are *loaded* and that you have access to
New-PSDrive HKU Registry HKEY_USERS
Get-ChildItem HKU: -ErrorAction SilentlyContinue |
% { Write-Host "`n`nEnvironment variables for $_"; Get-ItemProperty "HKU:\$_\Environment" -ErrorAction SilentlyContinue }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment