Last active
September 7, 2017 06:11
-
-
Save turboBasic/d011296924bf5faf57d6fa55dc6ca2f1 to your computer and use it in GitHub Desktop.
[Get list of all known folders] in Windows, even if user moved them to other non-standard locations. Answers the questions "How do I learn the path to the Desktop/Start Menu/Send To etc. directories?" #powershell #windows
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
$result = [ordered]@{}; | |
[Environment+SpecialFolder].GetEnumNames() | | |
Sort | | |
ForEach { | |
$result += @{ | |
$_ = [Environment]::GetFolderPath($_) | |
} | |
} | |
$result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment