Created
October 29, 2012 15:38
-
-
Save Iristyle/3974243 to your computer and use it in GitHub Desktop.
Get a list of user environment variables
This file contains hidden or 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
# 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