Created
August 18, 2014 11:31
-
-
Save igorpopovio/814c187f2343ad3743c2 to your computer and use it in GitHub Desktop.
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
# inspired from this article: | |
# http://windowsitpro.com/powershell/easily-finding-special-paths-powershell-scripts | |
$folders = [Environment+SpecialFolder]::GetNames([Environment+SpecialFolder]) | |
foreach ($folder in $folders) { | |
$location = [Environment]::GetFolderPath($folder) | |
$specialFoldersTable = New-Object PSObject | |
$specialFoldersTable | Add-Member FolderName $folder | |
$specialFoldersTable | Add-Member Location $location | |
Write-Output $specialFoldersTable | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The one that I needed can be accessed in 2 ways:
$env:LOCALAPPDATA
[Environment]::GetFolderPath("LocalApplicationData")
Both ways refer to this directory:
C:\Users\<username>\AppData\Local