Skip to content

Instantly share code, notes, and snippets.

@igorpopovio
Created August 18, 2014 11:31
Show Gist options
  • Save igorpopovio/814c187f2343ad3743c2 to your computer and use it in GitHub Desktop.
Save igorpopovio/814c187f2343ad3743c2 to your computer and use it in GitHub Desktop.
# 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
}
@igorpopovio
Copy link
Author

The one that I needed can be accessed in 2 ways:

  1. $env:LOCALAPPDATA
  2. [Environment]::GetFolderPath("LocalApplicationData")

Both ways refer to this directory:
C:\Users\<username>\AppData\Local

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment