Write-Host "Closing Teams in order to clear cache" try{ Get-Process -ProcessName Teams | Stop-Process -Force Start-Sleep -Seconds 5 Write-Host "Teams is now closed" } catch{ echo $_ } # Now clean temp file locations try{ Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\application cache\cache" -force | Remove-Item -Confirm:$false Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\blob_storage" -recurse -force | Remove-Item -Confirm:$false Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\cache" | Remove-Item -Confirm:$false Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\databases" -recurse -force | Remove-Item -Confirm:$false Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\gpucache" -force | Remove-Item -Confirm:$false Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\Indexeddb" -recurse -force | Remove-Item -recurse -Confirm:$false Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\Local Storage" -recurse -force | Remove-Item -recurse -Confirm:$false Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\tmp" -recurse -force | Remove-Item -Confirm:$false } catch{ echo $_ } # Teams cache is now cleaned write-host "Cleaned up Teams Cache"