Skip to content

Instantly share code, notes, and snippets.

@patrickhuber
Forked from anonymous/Clear-Tfscache.ps1
Created November 18, 2015 14:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save patrickhuber/19cdf39d6b17d8931193 to your computer and use it in GitHub Desktop.
Save patrickhuber/19cdf39d6b17d8931193 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