Skip to content

Instantly share code, notes, and snippets.

@notesbytom
Created March 26, 2019 17:31
Show Gist options
  • Save notesbytom/216e189c1fa5cb50b7b1b321e8b3bc06 to your computer and use it in GitHub Desktop.
Save notesbytom/216e189c1fa5cb50b7b1b321e8b3bc06 to your computer and use it in GitHub Desktop.
Show Special Folder Paths (Windows)
# Show Special Folder Paths (Windows PowerShell)
function Show-SpecialPaths () {
foreach ($fName in [System.Enum]::GetNames([System.Environment+SpecialFolder])) {
New-Object PSObject -Prop ([ordered]@{ 'Name'=$fName; 'Value'=[System.Environment]::GetFolderPath($fName) })
}
}
# Shows if desktop, documents, etc are redirected.
Show-SpecialPaths
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment