Skip to content

Instantly share code, notes, and snippets.

Created November 17, 2015 18:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/9bdf73a7b3d36cec2b89 to your computer and use it in GitHub Desktop.
Save anonymous/9bdf73a7b3d36cec2b89 to your computer and use it in GitHub Desktop.
clears the tfs cache for visual studio
$ErrorActionPreference = "Stop"
$directory = [io.path]::combine($env:LOCALAPPDATA, "microsoft", "team foundation")
foreach($versionDirectory in get-childitem $directory)
{
$cacheDirectory = Join-Path $versionDirectory.FullName "Cache"
$items = Get-ChildItem $cacheDirectory
foreach($item in $items)
{
Remove-Item -Recurse -Force $item.FullName
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment